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
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:


== Definition ==
== Definition ==
Instruments can be defined in [[Minecraft:data pack]]s, as part of the directory structure below.
Instruments can be defined in [[Minecraft:data pack]]s, as part of the directory structure below.


Line 13: Line 12:
* {{nbt|compound}} The root object.<section begin="json format" />
* {{nbt|compound}} The root object.<section begin="json format" />
** {{nbt|compound|description}}: A [[Minecraft:text component]] that is used as a description in tooltips.
** {{nbt|compound|description}}: A [[Minecraft:text component]] that is used as a description in tooltips.
** {{nbt|string}}{{nbt|compound|sound_event}}: {{json_ref|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 duration is.
** {{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|int|durability_damage}}{{upcoming|26.3}}: 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>
== Vanilla usage ==
{| class="wikitable"
! {{Tooltip|Goat horn|Goat horn with default data component}} !! {{Tooltip|ID|Instrument JSON name}} !! {{Tooltip|Description translation key|Translated-type text component translation key}} !! Range !! Sound event !! Use duration
|-
| {{ItemLink|Goat horn|Admire|link=none}}
| {{cd|admire_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/admire_goat_horn.json instrument/admire_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.admire_goat_horn}}
| rowspan="8" | 256.0
| {{cd|minecraft:item.goat_horn.sound.4}}
| rowspan="8" | 7.0
|-
| {{ItemLink|Goat horn|Call|link=none}}
| {{cd|call_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/call_goat_horn.json instrument/call_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.call_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.5}}
|-
| {{ItemLink|Goat horn|Dream|link=none}}
| {{cd|dream_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/dream_goat_horn.json instrument/dream_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.dream_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.7}}
|-
| {{ItemLink|Goat horn|Feel|link=none}}
| {{cd|feel_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/feel_goat_horn.json instrument/feel_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.feel_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.3}}
|-
| {{ItemLink|Goat horn|Ponder|link=none}}
| {{cd|ponder_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/ponder_goat_horn.json instrument/ponder_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.ponder_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.0}}
|-
| {{ItemLink|Goat horn|Seek|link=none}}
| {{cd|seek_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/seek_goat_horn.json instrument/seek_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.seek_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.2}}
|-
| {{ItemLink|Goat horn|Sing|link=none}}
| {{cd|sing_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/sing_goat_horn.json instrument/sing_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.sing_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.1}}
|-
| {{ItemLink|Goat horn|Yearn|link=none}}
| {{cd|yearn_goat_horn}}<ref>[https://github.com/misode/mcmeta/blob/diff/data/minecraft/instrument/yearn_goat_horn.json instrument/yearn_goat_horn − misode.mcmeta]</ref>
| {{cd|instrument.minecraft.yearn_goat_horn}}
| {{cd|minecraft:item.goat_horn.sound.6}}
|}


== History ==
== History ==
Line 24: Line 71:
|{{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|upcoming java}}
|{{HistoryLine||26.3|dev=snap1|The format of elements in the instrument registry have been updated: added the {{cd|durability_damage}} field, updated the {{cd|use_duration}} field.}}
|{{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.}}
}}
}}
== References ==
{{Reflist}}


== Navigation ==
== Navigation ==

Latest revision as of 11:08, 7 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:山羊角乐器定义格式