[PR #4578] [MERGED] Play the happy ghast's riding sound while the player rides one #5707

Closed
opened 2026-11-03 05:14:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4578
Author: @phexuss
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/happy-ghast-riding-sound


📝 Commits (1)

  • 648531c Play the happy ghast's riding sound while the player rides one

📊 Changes

4 files changed (+132 additions, -3 deletions)

View changed files

📝 crates/horizon-client-render/src/sound_engine.rs (+95 -0)
📝 crates/horizon-client/src/game.rs (+3 -0)
📝 crates/horizon-client/src/game/mob_sounds.rs (+32 -3)
📝 crates/horizon-client/src/game/music.rs (+2 -0)

📄 Description

🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally.

What and why

Part of #3518 (row RidingEntitySoundInstance.tick).

Riding a happy ghast was silent: LocalPlayer.startRiding starts a RidingEntitySoundInstance with entity.happy_ghast.riding that Horizon never played. This adds that looping, non-attenuated sound when the player mounts a happy ghast that isn't silent, and ticks it like vanilla: volume 5 * clampedLerp(speed, 0, 1) from the ghast's getDeltaMovement().length(), silent under water or below 0.01 speed, stopped when the player dismounts or the ghast goes away or turns silent.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

LocalPlayer.startRiding, RidingEntitySoundInstance (constructor, canPlaySound, tick), SoundEvents.HAPPY_GHAST_RIDING. No harness: a sound engine unit test drives the volume through speed, water and dismount. Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome.

Self-check

pr_ready (tools/pr_ready.py --quick on vm, against origin/main at a3726f4bf, 2 min 20 s)

Check Result
Scope ✅ 4 files, +132 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (35 s)
rustfmt ✅ (7 s)
tests: horizon-client, horizon-client-render ✅ 1681 passed (1 min 14 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

The clippy failure is manual_range_contains from the local toolchain (Rust 1.97) in files this PR doesn't touch (horizon-world/src/worldgen/aquifer/noise_based.rs, game/dragon.rs). With that lint allowed, cargo clippy -p horizon-client -p horizon-client-render --lib --bins --tests -- -D warnings is clean.


🔄 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/4578 **Author:** [@phexuss](https://github.com/phexuss) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/happy-ghast-riding-sound` --- ### 📝 Commits (1) - [`648531c`](https://github.com/horizon-rust/horizon/commit/648531c6dac670ba7e3f354ff7ecfd2122464b02) Play the happy ghast's riding sound while the player rides one ### 📊 Changes **4 files changed** (+132 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/sound_engine.rs` (+95 -0) 📝 `crates/horizon-client/src/game.rs` (+3 -0) 📝 `crates/horizon-client/src/game/mob_sounds.rs` (+32 -3) 📝 `crates/horizon-client/src/game/music.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally. ## What and why Part of #3518 (row `RidingEntitySoundInstance.tick`). Riding a happy ghast was silent: `LocalPlayer.startRiding` starts a `RidingEntitySoundInstance` with `entity.happy_ghast.riding` that Horizon never played. This adds that looping, non-attenuated sound when the player mounts a happy ghast that isn't silent, and ticks it like vanilla: volume `5 * clampedLerp(speed, 0, 1)` from the ghast's `getDeltaMovement().length()`, silent under water or below 0.01 speed, stopped when the player dismounts or the ghast goes away or turns silent. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `LocalPlayer.startRiding`, `RidingEntitySoundInstance` (constructor, `canPlaySound`, `tick`), `SoundEvents.HAPPY_GHAST_RIDING`. No harness: a sound engine unit test drives the volume through speed, water and dismount. Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on vm, against origin/main at a3726f4bf, 2 min 20 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +132 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (35 s) | | rustfmt | ✅ (7 s) | | tests: horizon-client, horizon-client-render | ✅ 1681 passed (1 min 14 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | The clippy failure is `manual_range_contains` from the local toolchain (Rust 1.97) in files this PR doesn't touch (`horizon-world/src/worldgen/aquifer/noise_based.rs`, `game/dragon.rs`). With that lint allowed, `cargo clippy -p horizon-client -p horizon-client-render --lib --bins --tests -- -D warnings` is clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:27 +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#5707
No description provided.