# Minecraft Goat Horn

> Minecraft Goat Horn Instrument 山羊角乐器定义：INSTRUMENT 注册表、data/<namespace>/instrument/ 数据包路径、tags/instrument/ 标签、JSON 格式（description 乐器名称文本组件、sound_event 吹奏时播放音效事件 注册名或内联定义、durability_damage 耐久消耗≥0、range 声音最大传播距离>0、use_duration 吹奏持续时间秒>0 影响物品冷却）、Definition Behavior 定义行为（服务器启动加载一次、/reload 不重新加载）、Blowing Behavior 吹奏行为（读取 instrument 物品栈组件 播放声音、record 类别 音量 range/16 音高1 立即播放线性衰减、可听距离取 sound_id attenuation_distance/instrument range/sound event range 最小值）。

- Skill: `zmjjkk123-hub/minecraft-goat-horn` (Agent Skill)
- Install (CLI): `npx skillmds@latest add zmjjkk123-hub/minecraft-goat-horn`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zmjjkk123-hub/minecraft-goat-horn/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ZMJJKK123-hub (https://skillmd.com/u/zmjjkk123-hub)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/zmjjkk123-hub/minecraft-goat-horn

---


# Goat Horn Instruments

This content applies only to Java Edition.

Goat horn instruments (instruments) determine the behavior when a player blows a goat horn. Definition files are their data-driven definitions in datapacks.

## Definition format

Instruments use the `INSTRUMENT` registry; the datapack path is `instrument` (definitions in `data/<namespace>/instrument`, tags in `data/<namespace>/tags/instrument`).

Definition files use JSON with the following structure:

- JSON file root object
  - `description` (string/compound/list, required): (text component) the instrument's name.
  - `sound_event` (string/compound, required): sound event played when blowing (registry name or inline definition).
  - `durability_damage` (int): (≥0) durability consumed per blow.
  - `range` (float, required): (>0) maximum distance the sound travels.
  - `use_duration` (float, required): (>0) blowing duration in seconds; affects the item cooldown.

## Definition behavior

Instrument data is loaded only once at server startup; `/reload` does not reload it — a server restart is required.

When a player blows a goat horn with the `instrument` item stack component, the game reads the instrument and plays it. The sound belongs to the `record` (jukebox/note block) category: volume = `range`/16, pitch 1, plays immediately with linear attenuation. The audible distance is the minimum of the referenced `sound_id`'s `attenuation_distance`, the instrument's `range`, and the sound event's `range`.

