// ... public static final Block CUSTOM_CROP = registerBlockOnly("custom_crop", CustomCropBlock::new, AbstractBlock.Settings.create().nonOpaque().noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); // ... private static Block registerBlockOnly(String path, Function factory, AbstractBlock.Settings settings) { final Identifier identifier = Identifier.of("tutorial", path); final RegistryKey registryKey = RegistryKey.of(RegistryKeys.BLOCK, identifier); return Blocks.register(registryKey, factory, settings); }