-
Notifications
You must be signed in to change notification settings - Fork 1
playsound
The playsound action plays a sound for the player. The sound is played client side only.
Added in release version 0.3.0
Must be "playsound".
Accepts a string. Valid values are the name of any sound event registered in Minecraft. Vanilla sound names can be found on the official wiki page. For non-vanilla sounds, the string must match the string returned by
soundevent.getRegistryName().getResourcePath()
where "soundevent" is the SoundEvent object registered by the mod during initialization.
Note that SoundEvents may have multiple sound files associated with them. It is not possible to select which sound file is played from a SoundEvent.
Accepts a string. Indicates which volume slider in the menu affects this sound. Valid values are:
- ambient
- blocks
- hostile
- master
- music
- player
- record
- voice
- weather
Default value is "ambient".
Accepts a number. Default is 1.
Accepts a number. Default is 1.
Accepts a number. Default value is 1.
The following example will play the ambient cave noises to the player:
{"type": "playsound", "sound": "ambient.cave"}