Posted April 18, 201411 yr Hi! I really would like myself understand the answer on my question but two hours later was never able understand. As seen from the title of the topic, I'm experimenting with shrubs. My class code: http://pastebin.com/cG7jZTZU When RenderType is "0" bush block in the inventory and on the ground looks like a block with the correct texture bush. (Meta read correct) [spoiler=Img1] When RenderType is "1" all the bushes blocks in the inventory look like dead bush, but on the ground look correct. (Meta read not correct) [spoiler=Img2] What am I doing wrong?
April 18, 201411 yr Hi I'm not sure I understand what's wrong - renderType 1 looks right to me? Anyway this link has a lot of background info on block and item rendering http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html See the BlockRendering and ItemRendering sections. -TGG
April 18, 201411 yr Author Hi, thanks for answer! I wanted to make a block with three different sprites with different indexes metadata. But I got three of the same block with the same sprite. I do not understand why the unit inherited from class "Block" with established RenderType: "1", in three blocks with different indices Metadata uses the same sprite for texture. I wrote the code at the example taken here: https://bitbucket.org/godshawk/isis/src/d4ed632ec2b69e93bbd5ab1865491e4e6f1090c2/minecraft/net/minecraft/block/BlockTallGrass.java?at=master
April 18, 201411 yr Hi OK, so if I understand your question: With renderType 1, the blocks on the ground are fine (deadbush, tallgrass, fern) but the ones in the inventory (on the creative tab) are all deadbush? I don't see an obvious reason for that. I'd suggest you put a breakpoint into getRenderType (returning 1) while viewing the inventory, then trace out into the vanilla code to see why it's not using the damage (meta) value. -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.