[PR #182] [MERGED] Fix classic menu click sounds to match vanilla #2382

Closed
opened 2026-11-02 15:55:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/182
Author: @rdbtCVS
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: t3code/fix-classic-ui-menu-sounds


📝 Commits (1)

  • d69a380 Fix classic menu click sounds to match vanilla

📊 Changes

10 files changed (+459 additions, -48 deletions)

View changed files

📝 crates/horizon-client/src/audio.rs (+44 -0)
📝 crates/horizon-client/src/game.rs (+16 -4)
📝 crates/horizon-client/src/game/lan_screen.rs (+3 -0)
📝 crates/horizon-client/src/game/options.rs (+9 -3)
📝 crates/horizon-client/src/game/screens.rs (+6 -0)
📝 crates/horizon-client/src/game/sign_edit.rs (+1 -0)
📝 crates/horizon-client/src/graphics_ui.rs (+51 -3)
📝 crates/horizon-client/src/options_ui.rs (+193 -37)
📝 crates/horizon-client/src/pack_screen.rs (+68 -0)
📝 crates/horizon-client/src/title.rs (+68 -1)

📄 Description

Classic title, options, pause, and death menu buttons handled clicks without playing Minecraft's button sound. Accepted classic controls now play minecraft:ui.button.click through the vanilla UI instance parameters: volume 0.25, pitch 1.0, UI category, relative position, no attenuation, and an independent unseeded random source.

Buttons sound on press; sliders sound once on release, including unchanged values and dragging outside the control. Navigation buttons sound even when their game action is None. Disabled controls, empty space, text fields, and ordinary list selections stay silent. The fix also covers graphics controls, resource-pack footer and confirmation buttons, world options, and the sign editor's Done button. Classic widget activation now accepts only the primary mouse button, while rebinding still accepts other buttons.

Validation:

  • cargo +1.99.0 test --locked -p horizon-client --lib --bin horizon-client --quiet: 447 library tests and 26 client tests passed.
  • cargo +1.99.0 clippy --locked -p horizon-client --lib --bin horizon-client --tests -- -D warnings: passed.
  • python3 tools/test_sound_engine_parity.py: 367,030 output lines matched the pinned Minecraft 26.3 client across 12,557 steps.
  • cargo +1.99.0 fmt --all -- --check, python3 tools/check_public_tree.py, and git diff --check: passed.

Click parameters and press/release timing were checked against the pinned client's AbstractWidget, AbstractSliderButton, and SimpleSoundInstance bytecode. Regression tests cover navigation, disabled and nonprimary clicks, silent selections, slider release timing, pack confirmations, and the actual audio instance. The audio harness compares sound-engine behavior, not audible sample output.

Fixes #140


🔄 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/182 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3code/fix-classic-ui-menu-sounds` --- ### 📝 Commits (1) - [`d69a380`](https://github.com/horizon-rust/horizon/commit/d69a380851d79e03f7fe45e1292112becaf27e08) Fix classic menu click sounds to match vanilla ### 📊 Changes **10 files changed** (+459 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/audio.rs` (+44 -0) 📝 `crates/horizon-client/src/game.rs` (+16 -4) 📝 `crates/horizon-client/src/game/lan_screen.rs` (+3 -0) 📝 `crates/horizon-client/src/game/options.rs` (+9 -3) 📝 `crates/horizon-client/src/game/screens.rs` (+6 -0) 📝 `crates/horizon-client/src/game/sign_edit.rs` (+1 -0) 📝 `crates/horizon-client/src/graphics_ui.rs` (+51 -3) 📝 `crates/horizon-client/src/options_ui.rs` (+193 -37) 📝 `crates/horizon-client/src/pack_screen.rs` (+68 -0) 📝 `crates/horizon-client/src/title.rs` (+68 -1) </details> ### 📄 Description Classic title, options, pause, and death menu buttons handled clicks without playing Minecraft's button sound. Accepted classic controls now play `minecraft:ui.button.click` through the vanilla UI instance parameters: volume 0.25, pitch 1.0, UI category, relative position, no attenuation, and an independent unseeded random source. Buttons sound on press; sliders sound once on release, including unchanged values and dragging outside the control. Navigation buttons sound even when their game action is `None`. Disabled controls, empty space, text fields, and ordinary list selections stay silent. The fix also covers graphics controls, resource-pack footer and confirmation buttons, world options, and the sign editor's Done button. Classic widget activation now accepts only the primary mouse button, while rebinding still accepts other buttons. Validation: - `cargo +1.99.0 test --locked -p horizon-client --lib --bin horizon-client --quiet`: 447 library tests and 26 client tests passed. - `cargo +1.99.0 clippy --locked -p horizon-client --lib --bin horizon-client --tests -- -D warnings`: passed. - `python3 tools/test_sound_engine_parity.py`: 367,030 output lines matched the pinned Minecraft 26.3 client across 12,557 steps. - `cargo +1.99.0 fmt --all -- --check`, `python3 tools/check_public_tree.py`, and `git diff --check`: passed. Click parameters and press/release timing were checked against the pinned client's `AbstractWidget`, `AbstractSliderButton`, and `SimpleSoundInstance` bytecode. Regression tests cover navigation, disabled and nonprimary clicks, silent selections, slider release timing, pack confirmations, and the actual audio instance. The audio harness compares sound-engine behavior, not audible sample output. Fixes #140 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:31 +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#2382
No description provided.