Nuparu00 Posted April 28, 2018 Share Posted April 28, 2018 (edited) Hello. I've used to be modding on 1.8.9 some time ago and I've finally decided to update my mod to some more recent version. I have successfully created some items, some blocks, and actually even converted my IEEP to the capability system, some WorldSavedData stuff, however, I have got a hard time now with a block, that has variants. This block is pretty much like a vanilla stone (literally, as it is a rock ). I have without any problems created the block itself with variants but have problems with the ItemBlocks. I want to list all variants in the creative tab and I do so by overriding Block#getSubBlocks() as in older versions. This adds more items to the creative tab BUT they have the same ID (without any metadata) as the original one and do not have any model or texture. After some research I have found out that ItemBlocks are not registered automatically anymore, so I've created my own class extending ItemBlock, registered it and the models. This makes the items have a model, but it is not corresponding the BlockState and still, it has the default ID. After some more messing with the code I have even managed it to show to correct ID - but still, it places the default block. Also , here is my code:Block ItemBlock Registring the block Edited April 30, 2018 by Nuparu00 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.