Simple multiplatform block and item registration.
In your central mod (the one that extends AbstractMod ), call registerItem and registerBlock.
Pass the registerBlock method a string name and a BlockContainer instance for your block.
BlockContainerThe block builder is a function that returns an instance of a block or something that extends block. I tried making this just a block, but NeoForge didn’t like that as it wasn’t immediately registered… I think. Changed it to this and it went smooth as butter, just a little awkward because if you need to get to the actual block, you have to ask the container instance for the block (don’t do this until after registration).
Properties for the BlockItem for the block. Ignored if you set ignoreItem to true. Defaults to the default item properties.
If you set this to true (false by default), no BlockItem will be created for the block.
The CreativeModeTab or ItemGroup this block (technically its BlockItem) should be added to.
BlockContainer.BasicA simpler version of the BlockContainer for simple blocks. Just feed it some block properties instead of a block builder, and it’ll make the block builder for you.
Pass the registerItem method a string name and an ItemContainer instance for your item.
ItemContainer