Camulorix Posted February 16, 2014 Share Posted February 16, 2014 Hi, I want to change the texture of an item based on the state of the item. To be more specific: I have an empty item and when I right click on a mob, it gets filled. The texture for the filled item is only visible when I hold it in my hands. In the inventory or a chest or when it is lying on the ground, the game uses the texture for the empty item. Currently I'm using getIcon() to return the icon I want to use. Both textures are set using registerIcons(). What did I miss or how can I achieve what I want? Quote Link to comment Share on other sites More sharing options...
mardiff Posted February 16, 2014 Share Posted February 16, 2014 If you know how to use metadata then use getIconFromDamage. Quote If you really want help, give that modder a thank you. Modders LOVE thank yous. Link to comment Share on other sites More sharing options...
Camulorix Posted February 16, 2014 Author Share Posted February 16, 2014 I down't know how to use metadata but I changed the class to use getIconFromDamage() and set the damage value to 1 when it's full and to 0 when it's empty. Now it works :-) Thanks for the hint in the right direction Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.