FANDOM


Creating a BlockEdit

All you need to do to add a block is add this line to your main Mod file:

registerBlock(Block block, String name, int id);

Replace "Block block" with "BlockYourBlockName". For example, if the block I was to add were a Crafting Bench, then it would be "BlockCraftingBench".

Then replace "String name" with the name of your block, such as "Crafting Bench".

Replace "int id" with a free block ID.


The final code should look something like this:

registerBlock(BlockCraftingBench, "Crafting Bench", 567);