public class TutorialBlockEntityTypes { public static > T register(String path, T blockEntityType) { return Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of("tutorial", path), blockEntityType); } public static final BlockEntityType DEMO_BLOCK = register( "demo_block", // For versions 1.21.2 and above, // replace `BlockEntityType.Builder` with `FabricBlockEntityTypeBuilder`. BlockEntityType.Builder.create(DemoBlockEntity::new, TutorialBlocks.DEMO_BLOCK).build() ); public static void initialize() { } }