Posted July 3, 20178 yr I'm trying to make a block (with TileEntity) that uses a different model depending on its NBT. Can anyone point me in a direction, I'm not sure where to start. I've done the same for items, but never for blocks. Edited July 3, 20178 yr by Tschipp
July 3, 20178 yr 1 minute ago, Tschipp said: a block that uses a different model depending on its NBT. Blocks do not have any NBT data associated with them. Do you mean ItemBlocks or TileEntities? ItemBlocks are not different from regular items in this regard. You can use Block::getActualState to return an IBlockState that relies on something like a TileEntity to define values for some of it's properties. See BlockFlowerPot for more details and an example.
July 3, 20178 yr Author 1 minute ago, V0idWa1k3r said: Blocks do not have any NBT data associated with them. Do you mean ItemBlocks or TileEntities? ItemBlocks are not different from regular items in this regard. You can use Block::getActualState to return an IBlockState that relies on something like a TileEntity to define values for some of it's properties. See BlockFlowerPot for more details and an example. Yeah sorry I meant TileEntities... long day
July 3, 20178 yr Author 3 minutes ago, diesieben07 said: You can put whatever data you need from the TileEntity into the block state either using getActualState (if the amount of states is enumerable) or getExtendedState (for this you will need a custom runtime model). I don't think I can use states, I'm making a block that can look like any other block. The tile entity stores a Blockstate value and the block is supposed to look like that blockstate Edited July 3, 20178 yr by Tschipp
July 3, 20178 yr Author 2 minutes ago, diesieben07 said: Then you need getExtendedState with unlisted properties and a custom runtime model. Ok, how do I make a runtime model?
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.