Posted May 9, 201411 yr I never expected I would ever have to ask for help with item icons I thought I had them figured out. Then I tried to do something new and here I am... Until recently I have been using getIconFromDamage() whenever I need to be able to switch between icons e.g. @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1) { if (par1 == 0) return itemIcon0; else if (par1 == 1) return itemIcon1; else return itemIcon2; } But then I switched to nbt for storing item data which obviously broke this so i switched to @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { if (ItemNBTHelper.getShort(stack, "size", (short)0) > 0 && ItemNBTHelper.getBoolean(stack, "obliterate", false)) return itemIcon2; else if (ItemNBTHelper.getShort(stack, "size", (short)0) > 0) return itemIcon1; else return itemIcon0; } But for some reason this dosnt work properly the item renders correctly in the players hand but in the inventory it tries to use the default icon (itemIcon) which in this case is null. Can anyone tell me what im doing wrong? I am the author of Draconic Evolution
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.