Instrument definition
Minecraft Wiki article. Categories: Java_Edition, Upcoming, Java_Edition_upcoming, Data_packs
📌 Mirrored from Minecraft Wiki
This article is reproduced from Instrument definition on the Minecraft Wiki. Mirrored from revision 3685669. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
On this page
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 server-side sound event (an [String] ID, or a new [NBT Compound / JSON Object] server-side 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 cooldown is. Can't be
0.[until: 26.3] Can be0for no cooldown.[upcoming: 26.3] - [Int] durability_damage[upcoming: 26.3]: An optional non-negative integer for the amount of durability to consume on each use.
- [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 | Added the durability_damage field - optional non-negative integer, amount of durability to consume on each use.
| |||||
Updated the use_duration field - can now be 0 for no cooldown. | |||||||
Navigation
Sources
- Instrument definition — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3685669.