[PR #2417] [MERGED] Make goat horns play their sound and show the horn pose #4295

Closed
opened 2026-11-03 04:16:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2417
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/goat-horns


📝 Commits (10+)

  • 9b88df3 Make goat horns play their sound and show the horn pose
  • 75267d2 Read inline goat horn instruments as well as registry ids
  • 36ba5c6 Merge remote-tracking branch 'origin/main' into HEAD
  • 6aabf3f Merge main into fix/goat-horns
  • c215a48 Merge main into fix/goat-horns
  • 3246732 Read the inline instrument through horizon_client_core::scoreboard
  • f5f5532 Merge main into fix/goat-horns
  • 29d24f4 Merge main into this branch
  • bcdcc9a Merge hr/main into fix/goat-horns; drop duplicate horn tooltip (main has instrument_line)
  • 65b0155 Merge remote-tracking branch 'hr/main' into fix/pr-2417

📊 Changes

6 files changed (+218 additions, -4 deletions)

View changed files

📝 crates/horizon-client-render/src/settings.rs (+3 -0)
📝 crates/horizon-client/src/game.rs (+48 -2)
📝 crates/horizon-client/src/game/lan_actions.rs (+37 -2)
📝 crates/horizon-client/src/game/remote.rs (+36 -0)
📝 crates/horizon-client/src/mobs/anim.rs (+9 -0)
📝 crates/horizon-items/src/items.rs (+85 -0)

📄 Description

What and why

Using a goat horn did nothing: no sound, no raised arm, no cooldown. The game only worked out the horn's use duration and had no use branch for it.

Now a goat horn follows InstrumentItem.use:

  • the player holds it up for the instrument's use_duration (and lets go early when the button is released);
  • the instrument's sound plays at the player on the records sound source, volume range / 16;
  • the instrument_play game event is posted (sculk sensors hear it), and the used statistic counts;
  • the horn is on cooldown for floor(use_duration * 20) ticks;
  • other players see the TOOT_HORN arm pose (main and off hand);
  • the tooltip shows the instrument's name (ponder_goat_horn unless the stack has an instrument component).

Server thread guests: the guest's use runs through the same code. The guest's client plays the horn itself, as vanilla's does, and the server sends the sound to the other players only (playSound(player, ...) skips the player). A client on another server does the same, so its own horn is heard.

Vanilla reference

  • InstrumentItem.use, play, getUseDuration, getUseAnimation
  • InstrumentComponent.addToTooltip
  • AvatarRenderer.getArmPose and HumanoidModel.poseRightArm / poseLeftArm (TOOT_HORN)
  • data/minecraft/instrument/*.json (sound_event, use_duration, range)

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2417 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/goat-horns` --- ### 📝 Commits (10+) - [`9b88df3`](https://github.com/horizon-rust/horizon/commit/9b88df32d33ada4a3fc5335bb38a6a1e5714d625) Make goat horns play their sound and show the horn pose - [`75267d2`](https://github.com/horizon-rust/horizon/commit/75267d2fc644780486de1f7330f3548f653abbff) Read inline goat horn instruments as well as registry ids - [`36ba5c6`](https://github.com/horizon-rust/horizon/commit/36ba5c65a61d463d545e6c8e1562b83db7ce375d) Merge remote-tracking branch 'origin/main' into HEAD - [`6aabf3f`](https://github.com/horizon-rust/horizon/commit/6aabf3f618ee615029a3538d90ce6cd194a71de6) Merge main into fix/goat-horns - [`c215a48`](https://github.com/horizon-rust/horizon/commit/c215a48c91db9bb05da112359497beed78fa532e) Merge main into fix/goat-horns - [`3246732`](https://github.com/horizon-rust/horizon/commit/32467320878b006eaa10017b18ea0815e3eb0ac4) Read the inline instrument through horizon_client_core::scoreboard - [`f5f5532`](https://github.com/horizon-rust/horizon/commit/f5f5532c190764631666f622c00750a464c18856) Merge main into fix/goat-horns - [`29d24f4`](https://github.com/horizon-rust/horizon/commit/29d24f48df9cf585a5b985bb3837536109dec30a) Merge main into this branch - [`bcdcc9a`](https://github.com/horizon-rust/horizon/commit/bcdcc9a460f0a32ba101e739fa6e0dff2f6b716a) Merge hr/main into fix/goat-horns; drop duplicate horn tooltip (main has instrument_line) - [`65b0155`](https://github.com/horizon-rust/horizon/commit/65b0155b8ea8c0cc32e16c0e8ff6c924040aa5e0) Merge remote-tracking branch 'hr/main' into fix/pr-2417 ### 📊 Changes **6 files changed** (+218 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/settings.rs` (+3 -0) 📝 `crates/horizon-client/src/game.rs` (+48 -2) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+37 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+36 -0) 📝 `crates/horizon-client/src/mobs/anim.rs` (+9 -0) 📝 `crates/horizon-items/src/items.rs` (+85 -0) </details> ### 📄 Description ## What and why Using a goat horn did nothing: no sound, no raised arm, no cooldown. The game only worked out the horn's use duration and had no use branch for it. Now a goat horn follows `InstrumentItem.use`: - the player holds it up for the instrument's `use_duration` (and lets go early when the button is released); - the instrument's sound plays at the player on the records sound source, volume `range / 16`; - the `instrument_play` game event is posted (sculk sensors hear it), and the used statistic counts; - the horn is on cooldown for `floor(use_duration * 20)` ticks; - other players see the TOOT_HORN arm pose (main and off hand); - the tooltip shows the instrument's name (`ponder_goat_horn` unless the stack has an `instrument` component). Server thread guests: the guest's use runs through the same code. The guest's client plays the horn itself, as vanilla's does, and the server sends the sound to the other players only (`playSound(player, ...)` skips the player). A client on another server does the same, so its own horn is heard. ## Vanilla reference - `InstrumentItem.use`, `play`, `getUseDuration`, `getUseAnimation` - `InstrumentComponent.addToTooltip` - `AvatarRenderer.getArmPose` and `HumanoidModel.poseRightArm` / `poseLeftArm` (`TOOT_HORN`) - `data/minecraft/instrument/*.json` (`sound_event`, `use_duration`, `range`) ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:09 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4295
No description provided.