Instrument definition
(Redirected from Goat horn instrument definition)
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
[edit | edit source]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
[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 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 be
0for no cooldown. - [Int] durability_damage: 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.
Vanilla usage
[edit | edit source]| Goat horn | ID | Description translation key | Range | Sound event | Use duration |
|---|---|---|---|---|---|
admire_goat_horn[1]
|
instrument.minecraft.admire_goat_horn
|
256.0 | minecraft:item.goat_horn.sound.4
|
7.0 | |
call_goat_horn[2]
|
instrument.minecraft.call_goat_horn
|
minecraft:item.goat_horn.sound.5
| |||
dream_goat_horn[3]
|
instrument.minecraft.dream_goat_horn
|
minecraft:item.goat_horn.sound.7
| |||
feel_goat_horn[4]
|
instrument.minecraft.feel_goat_horn
|
minecraft:item.goat_horn.sound.3
| |||
ponder_goat_horn[5]
|
instrument.minecraft.ponder_goat_horn
|
minecraft:item.goat_horn.sound.0
| |||
seek_goat_horn[6]
|
instrument.minecraft.seek_goat_horn
|
minecraft:item.goat_horn.sound.2
| |||
sing_goat_horn[7]
|
instrument.minecraft.sing_goat_horn
|
minecraft:item.goat_horn.sound.1
| |||
yearn_goat_horn[8]
|
instrument.minecraft.yearn_goat_horn
|
minecraft:item.goat_horn.sound.6
|
History
[edit | edit source]| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.21.2 | 24w33a | Added instruments to data packs, used only for goat horns. | |||||
| 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. | |||||||
References
[edit | edit source]- ↑ instrument/admire_goat_horn − misode.mcmeta
- ↑ instrument/call_goat_horn − misode.mcmeta
- ↑ instrument/dream_goat_horn − misode.mcmeta
- ↑ instrument/feel_goat_horn − misode.mcmeta
- ↑ instrument/ponder_goat_horn − misode.mcmeta
- ↑ instrument/seek_goat_horn − misode.mcmeta
- ↑ instrument/sing_goat_horn − misode.mcmeta
- ↑ instrument/yearn_goat_horn − misode.mcmeta