Posted May 31, 201510 yr Hello! I'm working with an item that changes its texture based off of NBT data. The texture changes on the held item, but the texture in the hotbar is constantly that dreaded purple/black "texture not found". What concept am I missing here? I thought the texture used for rendering in-hand were extracted from the 2D icon in the inventory (for items). The code for the item is here: https://goo.gl/93HpTr. Thanks in advance! EDIT: I should also mention I'm using IntelliJ as my IDE, in case that matters for some reason... Able to differentiate the difference of a sum and an integral.
May 31, 201510 yr I had a similar problem in my mod. In the constructor for my item, I included setTextureName("modname:texturename"). However, the icon in the inventory won't change to reflect the in-hand texture. modname is the name of the package containing your mod classes. For vanilla textures, use "minecraft" texturename is the name of your texture's image file without .png
May 31, 201510 yr Author I'm not sure the question is clear: I want the item's inventory icon to be changing with the hand-rendered item. The hand-rendered image *is* changing, but the inventory image is not. I have updated my code to reflect what you (McNutty) have said, but the issue still persists as I expected. (The updated code still exists at https://goo.gl/93HpTr.) So, in short, I still have not solution to this issue. Here are two screenshots of the issue if clarification is needed: Able to differentiate the difference of a sum and an integral.
May 31, 201510 yr Figured it out. Override getItemIndex, return IIcon that you want. That is the method that controls the inventory icon.
May 31, 201510 yr Author Awesome sauce! That worked perfectly! Thanks a ton! Able to differentiate the difference of a sum and an integral.
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.