Instrument definition

Jump to navigation Jump to search

An instrument consists of a sound with its corresponding range and use duration. They are currently only used for goat horns.

Definition[edit | edit source]

Instruments can be defined in data packs, as part of the directory structure below.

JSON Format[edit | edit source]

Instruments are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [NBT Compound / JSON Object] description: A text component that is used as a description in tooltips.
    • [String][NBT Compound / JSON Object] sound_event: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
    • [Float] use_duration: A non-negative float for how long the use duration is.
    • [Float] range: A non-negative float for the range of the sound.

History[edit | edit source]

Java Edition
1.21.224w33aAdded instruments to data packs, used only for goat horns.

Navigation[edit | edit source]