diff --git a/src/main/java/forestry/apiculture/items/ItemBeeGE.java b/src/main/java/forestry/apiculture/items/ItemBeeGE.java index f5f584021..99a38d7b0 100755 --- a/src/main/java/forestry/apiculture/items/ItemBeeGE.java +++ b/src/main/java/forestry/apiculture/items/ItemBeeGE.java @@ -178,12 +178,18 @@ public class ItemBeeGE extends ItemGE { } } - @SideOnly(Side.CLIENT) @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack itemstack, int renderPass) { return getIconFromSpecies(BeeGenome.getSpecies(itemstack), renderPass); } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconIndex(ItemStack stack) { + return getIcon(stack, 0); + } + @SideOnly(Side.CLIENT) public IIcon getIconFromSpecies(IAlleleBeeSpecies species, int renderPass) { if (species == null) { diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java index 5f521ed53..47cc919c4 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java @@ -16,10 +16,16 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + import forestry.api.arboriculture.EnumWoodType; import forestry.arboriculture.IWoodTyped; +import forestry.arboriculture.blocks.BlockLog; +import forestry.arboriculture.render.IconProviderWood; import forestry.arboriculture.tiles.TileWood; import forestry.core.config.Constants; import forestry.core.items.ItemBlockForestry; @@ -98,4 +104,24 @@ public class ItemBlockWood extends ItemBlockForestry { return displayName; } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass) { + EnumWoodType woodType = EnumWoodType.getFromCompound(stack.getTagCompound()); + if (woodType == null) { + return super.getIcon(stack, pass); + } + + if (getBlock() instanceof BlockLog) { + return IconProviderWood.getBarkIcon(woodType); + } else { + return IconProviderWood.getPlankIcon(woodType); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconIndex(ItemStack stack) { + return getIcon(stack, 0); + } } diff --git a/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java b/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java index ca72ec1fa..90d229d94 100755 --- a/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java +++ b/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java @@ -143,6 +143,12 @@ public class ItemGermlingGE extends ItemGE implements IVariableFermentable { return species.getGermlingIcon(type, renderPass); } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconIndex(ItemStack stack) { + return getIcon(stack, 0); + } + @Override public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float facingX, float facingY, float facingZ) { ITree tree = TreeManager.treeRoot.getMember(itemstack);