User Tools

Site Tools


tutorial:sounds

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:sounds [2023/01/09 17:51] โ€“ [Step 3: Create your sound event] Updated for 1.19.3+ slainlighttutorial:sounds [2023/01/09 18:20] (current) โ€“ [Step 4: Register your sound event] 1.19.3 Registries Change slainlight
Line 81: Line 81:
 public void onInitialize(){ public void onInitialize(){
      [...]      [...]
-     Registry.register(Registry.SOUND_EVENT, ExampleMod.MY_SOUND_ID, MY_SOUND_EVENT);+     Registry.register(Registries.SOUND_EVENT, ExampleMod.MY_SOUND_ID, MY_SOUND_EVENT);
  
 </code> </code>
 +If you're using version 1.19.2 or below, please replace ''Registries'' with ''Registry''ใ€‚
 ==== Step 5: Use your sound event ==== ==== Step 5: Use your sound event ====
 Use the sound event just like we explained at the start (''onUse'' is just an example, use it anywhere you have access to ''World'' instance): Use the sound event just like we explained at the start (''onUse'' is just an example, use it anywhere you have access to ''World'' instance):
tutorial/sounds.txt ยท Last modified: 2023/01/09 18:20 by slainlight