[PR #1966] [CLOSED] Fix continuous hit sounds after instant survival breaks #3896

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1966
Author: @rdbtCVS
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: t3/fix-dead-bush-mining-sound


📝 Commits (1)

  • 6bf315e Fix retained server digging after instant survival breaks

📊 Changes

2 files changed (+44 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+8 -7)
📝 tools/lan_e2e.py (+36 -0)

📄 Description

🤖 Opened by rdbt's AI agent (Codex), not by rdbt himself.

What and why

Fixes #1908. After an instant survival break, the client sends START without STOP. The server retained that guest's digging position and kept mining air there, producing repeated stone hit sounds until another dig replaced it. It could also break a block placed back at that position without another click.

End the guest's digging and mining state when the target becomes air, including instant breaks that never produced a crack animation. The change is confined to the existing server dig feedback cleanup.

Vanilla reference

Read the pinned 26.3 bytecode with javap -c -p: MultiPlayerGameMode.startDestroyBlock / its prediction lambda destroys instant survival blocks without setting isDestroying; ServerPlayerGameMode.handleBlockBreakAction handles instant breaks without needing STOP, and ServerPlayerGameMode.tick clears isDestroyingBlock when the target becomes air, regardless of the last crack stage.

Added tools/lan_e2e.py --check instant_digging: break a dead bush in survival, assert no stone hit sounds afterward, then replace the bush and assert it stays. The unmodified latest upstream (6df37324f) failed with 3 stone hits and the replacement bush removed for the guest. With this fix, both host and guest report 0 stone hits and the replacement intact.

Self-check

  • python3 tools/lan_e2e.py --bin-dir target/fast --check instant_digging --check digging: passed.
  • Same checks with --server-thread: passed.
  • Existing digging coverage still breaks six logs, preserves a stone block while its client stalls, and plays its break sound once.
  • Parity checks left to CI as requested.

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 6df37324f, 6 min 42 s)

Check Result
Scope ✅ 2 files, +44 −7
Cargo.lock ✅ unchanged
Public tree ✅ (2 s)
Python tests ✅ 287 passed (36 s)
rustfmt ✅ (11 s)
clippy ✅ (1 min 38 s)
tests: horizon-client ✅ 1258 passed (3 min 49 s)
doc tests ✅ 0 passed (6 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 28 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, lore_tooltip, mace and 16 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Maintainer edits enabled.

🤖 Generated with Codex


🔄 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/1966 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `t3/fix-dead-bush-mining-sound` --- ### 📝 Commits (1) - [`6bf315e`](https://github.com/horizon-rust/horizon/commit/6bf315e2ab7ec8bd247496c69d049985cad389f3) Fix retained server digging after instant survival breaks ### 📊 Changes **2 files changed** (+44 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+8 -7) 📝 `tools/lan_e2e.py` (+36 -0) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (Codex), not by rdbt himself. ## What and why Fixes #1908. After an instant survival break, the client sends START without STOP. The server retained that guest's digging position and kept mining air there, producing repeated stone hit sounds until another dig replaced it. It could also break a block placed back at that position without another click. End the guest's digging and mining state when the target becomes air, including instant breaks that never produced a crack animation. The change is confined to the existing server dig feedback cleanup. ## Vanilla reference Read the pinned 26.3 bytecode with `javap -c -p`: `MultiPlayerGameMode.startDestroyBlock` / its prediction lambda destroys instant survival blocks without setting `isDestroying`; `ServerPlayerGameMode.handleBlockBreakAction` handles instant breaks without needing STOP, and `ServerPlayerGameMode.tick` clears `isDestroyingBlock` when the target becomes air, regardless of the last crack stage. Added `tools/lan_e2e.py --check instant_digging`: break a dead bush in survival, assert no stone hit sounds afterward, then replace the bush and assert it stays. The unmodified latest upstream (6df37324f) failed with **3 stone hits and the replacement bush removed** for the guest. With this fix, both host and guest report **0 stone hits and the replacement intact**. ## Self-check - `python3 tools/lan_e2e.py --bin-dir target/fast --check instant_digging --check digging`: passed. - Same checks with `--server-thread`: passed. - Existing `digging` coverage still breaks six logs, preserves a stone block while its client stalls, and plays its break sound once. - Parity checks left to CI as requested. **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 6df37324f, 6 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +44 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (2 s) | | Python tests | ✅ 287 passed (36 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (1 min 38 s) | | tests: horizon-client | ✅ 1258 passed (3 min 49 s) | | doc tests | ✅ 0 passed (6 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 28 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, lore_tooltip, mace and 16 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Maintainer edits enabled. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:05 +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#3896
No description provided.