public class ExampleMod implements ModInitializer { // For versions below 1.20: // public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).strength(4.0f)); // For versions below 1.20.5: // public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.create().strength(4.0f)); // For versions since 1.20.5 below 1.21.2: public static final Block EXAMPLE_BLOCK = new Block(Block.Settings.create().strength(4.0f)); @Override public void onInitialize() { // For versions below 1.21: // Registry.register(Registries.BLOCK, new Identifier("tutorial", "example_block"), EXAMPLE_BLOCK); // For versions since 1.21: Registry.register(Registries.BLOCK, Identifier.of("tutorial", "example_block"), EXAMPLE_BLOCK); } }