Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Instrument definition: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 14: Line 14:
** {{nbt|string}}{{nbt|compound|sound_event}}: {{json_ref|server-side sound event|inline=1}}
** {{nbt|string}}{{nbt|compound|sound_event}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt inherit/sound event}}
*** {{nbt inherit/sound event}}
** {{nbt|float|use_duration}}: A non-negative float for how long the use cooldown is. Can't be {{cd|0}}.{{until|26.3}} Can be {{cd|0}} for no cooldown.{{upcoming|26.3}}
** {{nbt|float|use_duration}}: A non-negative float for how long the use cooldown is. Can be {{cd|0}} for no cooldown.
** {{nbt|int|durability_damage}}{{upcoming|26.3}}: An optional non-negative integer for the amount of durability to consume on each use.
** {{nbt|int|durability_damage}}: An optional non-negative integer for the amount of durability to consume on each use.
** {{nbt|float|range}}: A non-negative float for the range of the sound.<section end="json format" />
** {{nbt|float|range}}: A non-negative float for the range of the sound.<section end="json format" />
</div>
</div>
Line 70: Line 70:
|{{HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.21.2|dev=24w33a|Added instruments to [[Minecraft:data pack]]s, used only for [[Minecraft:goat horn]]s.}}
|{{HistoryLine||1.21.2|dev=24w33a|Added instruments to [[Minecraft:data pack]]s, used only for [[Minecraft:goat horn]]s.}}
|{{HistoryLine|upcoming java}}
|{{HistoryLine||26.3|dev=snap1|Added the {{cd|durability_damage}} field - optional non-negative integer, amount of durability to consume on each use.
|{{HistoryLine||26.3|dev=snap1|Added the {{cd|durability_damage}} field - optional non-negative integer, amount of durability to consume on each use.
|Updated the {{cd|use_duration}} field - can now be {{cd|0}} for no cooldown.}}
|Updated the {{cd|use_duration}} field - can now be {{cd|0}} for no cooldown.}}

Latest revision as of 11:22, 16 September 2026

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

Definition

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

Template:Data pack directory

JSON Format

Instruments are defined using the following format:

Vanilla usage

Template:Tooltip Template:Tooltip Template:Tooltip Range Sound event Use duration
Template:ItemLink Template:Cd<ref>instrument/admire_goat_horn − misode.mcmeta</ref> Template:Cd 256.0 Template:Cd 7.0
Template:ItemLink Template:Cd<ref>instrument/call_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/dream_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/feel_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/ponder_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/seek_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/sing_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd
Template:ItemLink Template:Cd<ref>instrument/yearn_goat_horn − misode.mcmeta</ref> Template:Cd Template:Cd

History

Template:HistoryTable

References

Template:Reflist

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Bockshorninstrumentendefinition Minecraft:fr:Définition d'instrument de corne de chèvre Minecraft:pt:Definição de instrumento de chifre de cabra Minecraft:zh:山羊角乐器定义格式