tutorial:sounds
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:sounds [2023/01/09 17:51] – [Step 3: Create your sound event] Updated for 1.19.3+ slainlight | tutorial:sounds [2024/06/23 16:23] (current) – slainlight | ||
|---|---|---|---|
| Line 70: | Line 70: | ||
| public class ExampleMod { | public class ExampleMod { | ||
| [...] | [...] | ||
| - | public static final Identifier MY_SOUND_ID = new Identifier(" | + | public static final Identifier MY_SOUND_ID = Identifier.of(" |
| public static SoundEvent MY_SOUND_EVENT = SoundEvent.of(MY_SOUND_ID); | public static SoundEvent MY_SOUND_EVENT = SoundEvent.of(MY_SOUND_ID); | ||
| } | } | ||
| </ | </ | ||
| - | If you're using version 1.19.2 or below, please replace '' | + | If you're using version 1.19.2 or below, please replace '' |
| + | if you're using versions below 1.21, replace '' | ||
| ==== Step 4: Register your sound event ==== | ==== Step 4: Register your sound event ==== | ||
| Register your sound event under the '' | Register your sound event under the '' | ||
| Line 81: | Line 82: | ||
| public void onInitialize(){ | public void onInitialize(){ | ||
| [...] | [...] | ||
| - | | + | |
| } | } | ||
| </ | </ | ||
| + | If you're using version 1.19.2 or below, please replace '' | ||
| ==== Step 5: Use your sound event ==== | ==== Step 5: Use your sound event ==== | ||
| Use the sound event just like we explained at the start ('' | Use the sound event just like we explained at the start ('' | ||
tutorial/sounds.1673286687.txt.gz · Last modified: 2023/01/09 17:51 by slainlight