Updated:
1. Give a horn with a sound (Java)
/give @s minecraft:goat_horn[instrument="minecraft:ponder_goat_horn"]
On 1.20.4 and older write {instrument:"…"} instead of [ ]. See the give command.
2. The eight sounds
| Java ID | Bedrock data value |
|---|---|
| minecraft:ponder_goat_horn | 0 |
| minecraft:sing_goat_horn | 1 |
| minecraft:seek_goat_horn | 2 |
| minecraft:feel_goat_horn | 3 |
| minecraft:admire_goat_horn | 4 |
| minecraft:call_goat_horn | 5 |
| minecraft:yearn_goat_horn | 6 |
| minecraft:dream_goat_horn | 7 |
The first four come from regular goats, the last four from screaming goats.
3. Bedrock
/give @s goat_horn 1 5
The data value picks the sound; 5 is call.
4. Play the sound without a horn (Java)
/execute as @a at @s run playsound minecraft:item.goat_horn.sound.5 master @s ~ ~ ~ 1 1
Sounds 0 to 7 follow the table order. Great as a start signal; see the playsound command and the countdown command.
5. Give a named horn (Java)
/give @s minecraft:goat_horn[instrument="minecraft:call_goat_horn",custom_name={"text":"Rally Horn","color":"gold","italic":false}]
This is the 1.21.5+ form. On 1.20.5 to 1.21.4, write the name as a JSON string inside single quotes. See item name colors.
6. Buff nearby players when a horn is blown (Java)
/scoreboard objectives add horn minecraft.used:minecraft.goat_horn
# Repeating command block
execute as @a[scores={horn=1..}] at @s run effect give @a[distance=..16] minecraft:speed 10 1
# Chain command block
scoreboard players reset @a[scores={horn=1..}] horn
The minecraft.used statistic counts horn uses. Everyone within 16 blocks of the player gets Speed II for 10 seconds. Swap the effect using the effect command guide, or see right-click detection for other items.
Troubleshooting
- Wrong sound: the ID must end in
_goat_horn. - Cannot blow again: horns have a cooldown of about 7 seconds; use playsound for rapid calls.
- Error on 1.20.4: use the older curly brace form.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.