1public class ModBlocks {
2 //defferedRegistry
3 public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, modclass.MOD_ID);
4 //and now the registerobject of a block
5 public static final RegistryObject<Block> NAME_BLOCK = BLOCKS.register("name_block", () -> new Block(Block.Properties.create(Material.MATERIAL).sound(SoundType.SOUND).hardnessAndResistance(hardness, resistance)));
6 //replace NAME_BLOCK by the name of your block (always in caps) same with the register but with no caps
7 //replace MATERIAL by the material name, replace SOUND with the sound name , replace hardness with the Float of hardness value, replace resistance with Float of resistance value
8 //you can allways add more things for proprieties
9}