mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Mana Cookie renamed to Biscuit of Totality.
This commit is contained in:
1 parent
a73097c10d
commit
99c7aa0270
3 files changed
+17
-3
No files matched your search
@@ -16,6 +16,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
@@ -28,6 +29,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemManaCookie extends ItemFood {
|
||||
|
||||
private IIcon totalBiscuitIcon;
|
||||
|
||||
public ItemManaCookie() {
|
||||
super(0, 0.1F, false);
|
||||
setPotionEffect(Potion.field_76443_y.id, 1, 0, 1F);
|
||||
@@ -51,11 +54,22 @@ public class ItemManaCookie extends ItemFood {
|
||||
public String getUnlocalizedNameInefficiently(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return getIconIndex(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
return stack.getDisplayName().toLowerCase().equals("totalbiscuit") ? totalBiscuitIcon : super.getIconIndex(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
totalBiscuitIcon = IconHelper.forName(par1IconRegister, "totalBiscuit");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user