Wiki ArticleJava EditionJava Edition upcomingData packs
Instrument definition
An instrument consists of a sound with its corresponding range and use duration. They are currently only used for goat horns.
Instruments can be defined in data packs, as part of the directory structure below.
Instruments are defined using the following format:
This feature is exclusive to Java Edition.
An instrument consists of a sound with its corresponding range and use duration. They are currently only used for goat horns.
Definition
Instruments can be defined in data packs, as part of the directory structure below.
data pack name.zip or
data pack name
pack.mcmeta
data
namespace
instrument
<name>.json
- More directories…
JSON Format
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)
- A sound event see Template:Nbt inherit/sound event/template
- [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
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.21.2 | 24w33a | Added instruments to data packs, used only for goat horns. | |||||
| Upcoming Java Edition | |||||||
| 26.3 | snap1 | The format of elements in the instrument registry have been updated: added the durability_damage field, updated the use_duration field. | |||||
Navigation
| |||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||