提供: Minecraft Modding Wiki
public class ExampleMod {
public static final Identifier SAMPLE_SOUND_ID = new Identifier(MOD_ID":sample_sound") public static SoundEvent SAMPLE_SOUND_EVENT = new SoundEvent(SAMPLE_SOUND_ID);
@Override public void onInitialize(){ [...] Registry.register(Registry.SOUND_EVENT, SampleMod.MY_SOUND_ID, MY_SOUND_EVENT); }
}