Posted October 13, 201411 yr Hello everyone. I was wondering how I would set the metadata for a block as an ItemBlock. Normally this doesn't matter, but when it has multiple textures, specifically, a front texture, I want to know how I orientate it in the players inventory. Currently, all the icons are just the default blockIcon (I normally use this icon as the back, and sides). I can't figure out how vanilla blocks such as the furnace, dispenser, or piston do it. Thanks. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
October 13, 201411 yr Hi I think you might be confusing metadata with side? getIconFromDamage (eg see ItemCloth) can be used to "convert" the item damage into the block metadata, but I don't think this is what you want. I think you need to either choose your side orientations so that the default rendering (metadata = 0) shows the faces you want rendered in the inventory. You can override getIconFromDamage to return a different "fake" metadata for your block so that it renders the sides you want, if you're not actually using metadata for your item. FYI the rendering for ItemBlocks is done in RenderBlocks.renderBlockAsItem() -TGG
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.