Skip to content

SoundAction v3

Hoid2 edited this page Jan 19, 2022 · 3 revisions

Sound Action

Sound actions make sounds.

They look like:

{
  ...common fields...
  "sound": "",
  "category": "",
  "position": {}, 
  "volume": 0, 
  "pitch": 0
}

(common fields are specified in Actions v3)

Sound (defaults to "UI_BUTTON_CLICK")

This is the identifier for the sound to emit. See Common Types v3. You can look here for Vanilla Minecraft values. For example, "ambient.basalt_deltas.additions".

Category (defaults to "MASTER")

This determines what volume category this sound is in (look at the Sound settings in Minecraft's option menu). This is a string.

Types
  • "MASTER"
  • "MUSIC"
  • "RECORDS"
  • "WEATHER"
  • "BLOCKS"
  • "HOSTILE"
  • "NEUTRAL"
  • "PLAYERS"
  • "AMBIENT"
  • "VOICE"

Position (defaults to the player's position)

This is the position of where the sound is played. This is an object.
It looks like:

{
  "x": 0,
  "y": 0,
  "z": 0
}

Volume (defaults to 1)

The volume of the sound. This is a float.

Pitch (defaults to 1)

The pitch of the sound. This is a float.

Clone this wiki locally