public class ExampleMod implements ModInitializer { public static final RegistryKey CUSTOM_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of("tutorial","ore_custom")); @Override public void onInitialize() { //Your other code here... } }