[PR #1922] [MERGED] Fix repeated mining sounds and replanted blocks breaking #3866

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

📋 Pull Request Information

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

Base: main ← Head: t3/fix-crop-planting-harvesting


📝 Commits (2)

  • 09ff66b Fix stale server digging after instant survival breaks
  • 0b970c0 Cover instant-break sounds alongside replanting

📊 Changes

2 files changed (+110 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+5 -6)
📝 tools/lan_e2e.py (+105 -0)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Codex), not by rdbtCVS themselves.

What and why

Fixes #1880 and #1908, including the same behavior when harvesting and replanting crops with seeds or carrots.

A survival instant break finishes on START, so the client sends neither STOP nor ABORT when attack is released. The server cleared the mining progress but kept the guest's active digging position, repeatedly breaking any replacement planted there. The same stale digging also keeps hitting air, producing repeated stone hit sounds after breaking a dead bush (#1908). Clear that position when mining finishes, as the existing creative path already does. This applies to the integrated server, LAN guests, and dedicated servers.

Add a lan_e2e.py --check replant regression that harvests and actually replants dandelions, wheat, and carrots, then checks both players still see the replacement after the old destroy delay. It also covers creative flowers. The old build reproduces the failure: the guest's replanted dandelion becomes air on both sides.

The instant_digging regression moved from redundant PR #1966 checks that an instant dead-bush break produces no subsequent stone hit sounds and that a replacement bush survives. It runs for both players in both host modes.

Vanilla reference

Read the pinned 26.3 methods with tools/rea_vanilla.py:

  • ServerPlayerGameMode.handleBlockBreakAction: the creative and instant survival branches destroy once and return without starting ongoing destruction.
  • MultiPlayerGameMode.startDestroyBlock and stopDestroyBlock: instant breaks do not set isDestroying, so releasing attack sends no ABORT.

Self-check

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

Check Result
Scope ✅ 2 files, +110 −6
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 287 passed (29 s)
rustfmt ✅ (9 s)
clippy ✅ (1 min 34 s)
tests: horizon-client ✅ 1242 passed (4 min 9 s)
doc tests ✅ 0 passed (8 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 27 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, mace, online_mode and 15 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Additional validation:

  • Consolidated coverage: instant_digging, replant, and digging all passed for both players with an in-frame host and with --server-thread. Both players heard zero stray stone hits, and replacement dead bushes survived. No code from #1966 is needed.
  • lan_e2e.py --check replant: passed for both host and guest with an in-frame host.
  • lan_e2e.py --server-thread --check replant: passed for both host and guest with an integrated server.
  • Existing --check cracks: passed in both modes (ordinary gradual mining and crack cleanup).
  • parity.py first_person breaking_model interaction_input: all three passed against 26.3.
  • Confirmed the old build destroys the replanted flower and wheat. Final regression verifies the aimed block and waits for both clients' updates.

Linux game checks used Xvfb and fresh scratch game/launcher/XDG homes. The self-check also ran with scratch homes; its initial unisolated run hit the existing horizon-ctl test's local no-AI policy, then passed in isolation.

The broader affected parity set is left for CI. The harness writes screenshots of the surviving flowers and crops to its output folder.

🤖 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/1922 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/fix-crop-planting-harvesting` --- ### 📝 Commits (2) - [`09ff66b`](https://github.com/horizon-rust/horizon/commit/09ff66bfeee243b10396a77381095eaa31670327) Fix stale server digging after instant survival breaks - [`0b970c0`](https://github.com/horizon-rust/horizon/commit/0b970c0c9a0eb259652f5bee756073563e471faf) Cover instant-break sounds alongside replanting ### 📊 Changes **2 files changed** (+110 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+5 -6) 📝 `tools/lan_e2e.py` (+105 -0) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Codex), not by rdbtCVS themselves. ## What and why Fixes #1880 and #1908, including the same behavior when harvesting and replanting crops with seeds or carrots. A survival instant break finishes on START, so the client sends neither STOP nor ABORT when attack is released. The server cleared the mining progress but kept the guest's active digging position, repeatedly breaking any replacement planted there. The same stale digging also keeps hitting air, producing repeated stone hit sounds after breaking a dead bush (#1908). Clear that position when mining finishes, as the existing creative path already does. This applies to the integrated server, LAN guests, and dedicated servers. Add a `lan_e2e.py --check replant` regression that harvests and actually replants dandelions, wheat, and carrots, then checks both players still see the replacement after the old destroy delay. It also covers creative flowers. The old build reproduces the failure: the guest's replanted dandelion becomes air on both sides. The `instant_digging` regression moved from redundant PR #1966 checks that an instant dead-bush break produces no subsequent stone hit sounds and that a replacement bush survives. It runs for both players in both host modes. ## Vanilla reference Read the pinned 26.3 methods with `tools/rea_vanilla.py`: - `ServerPlayerGameMode.handleBlockBreakAction`: the creative and instant survival branches destroy once and return without starting ongoing destruction. - `MultiPlayerGameMode.startDestroyBlock` and `stopDestroyBlock`: instant breaks do not set `isDestroying`, so releasing attack sends no ABORT. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at b7b4a2616, 6 min 55 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +110 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 287 passed (29 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (1 min 34 s) | | tests: horizon-client | ✅ 1242 passed (4 min 9 s) | | doc tests | ✅ 0 passed (8 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 27 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, mace, online_mode and 15 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Additional validation: - Consolidated coverage: `instant_digging`, `replant`, and `digging` all passed for both players with an in-frame host and with `--server-thread`. Both players heard zero stray stone hits, and replacement dead bushes survived. No code from #1966 is needed. - `lan_e2e.py --check replant`: passed for both host and guest with an in-frame host. - `lan_e2e.py --server-thread --check replant`: passed for both host and guest with an integrated server. - Existing `--check cracks`: passed in both modes (ordinary gradual mining and crack cleanup). - `parity.py first_person breaking_model interaction_input`: all three passed against 26.3. - Confirmed the old build destroys the replanted flower and wheat. Final regression verifies the aimed block and waits for both clients' updates. Linux game checks used Xvfb and fresh scratch game/launcher/XDG homes. The self-check also ran with scratch homes; its initial unisolated run hit the existing horizon-ctl test's local no-AI policy, then passed in isolation. The broader affected parity set is left for CI. The harness writes screenshots of the surviving flowers and crops to its output folder. 🤖 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:12:53 +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#3866
No description provided.