[PR #2932] [MERGED] Keep a move behind a dig and its arm swing for the next tick #4690

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2932
Author: @RVZO6
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/dig-down-jitter


📝 Commits (1)

  • 32a0a11 Keep a move behind a dig and its arm swing for the next tick

📊 Changes

2 files changed (+56 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/lan/hub.rs (+8 -5)
📝 crates/horizon-client/tests/lan_bot.rs (+48 -0)

📄 Description

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

What and why

Digging straight down in a single-player world (server thread), the player sinks into the block they just broke, is put back on top of it a tick later, then falls. The break particles clip at the same moment.

The hub hands a dig (handlePlayerAction) to the game after its pass over the inbox, and a move queued directly behind it already waits for the next tick, so it is not checked against the block the game is about to break. A creative break sends the arm swing (Punch) between the dig and the move, so the move was handled in the same pass: the block was still there, collide refused the move, and the player was teleported back to where they stood. Traced queue after a creative START: [Punch, MovePlayerPos, ClientTickEnd].

After a dig, any move left in the queue now waits, with everything queued before it, so the packets keep their order.

Vanilla reference

ServerGamePacketListenerImpl handles a player's packets in order: handlePlayerAction (ServerPlayerGameMode.handleBlockBreakAction, which destroys at once in creative) runs before the handleMovePlayer that follows it, so the move's isPlayerCollidingWithAnythingNew check sees the block gone.

Harness: a new tests/lan_bot.rs test queues a dig, an arm swing and a move, and checks that the move waits for the next tick; it fails without the fix. Also traced with horizon-ctl in a creative world, looking straight down and breaking one block at a time: the player rose back up after 6 to 7 of 8 breaks before, after none now.

Self-check

pr_ready (tools/pr_ready.py --quick, against origin/main at 27c355942, 5 min 24 s)

Check Result
Scope ✅ 3 files, +56 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 369 passed (32 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 31 s)
tests: horizon-client ✅ 1303 passed (3 min 1 s)
doc tests ✅ 0 passed (15 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
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/2932 **Author:** [@RVZO6](https://github.com/RVZO6) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/dig-down-jitter` --- ### 📝 Commits (1) - [`32a0a11`](https://github.com/horizon-rust/horizon/commit/32a0a11fed249692dbd162bfaeef6cf480a11913) Keep a move behind a dig and its arm swing for the next tick ### 📊 Changes **2 files changed** (+56 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/hub.rs` (+8 -5) 📝 `crates/horizon-client/tests/lan_bot.rs` (+48 -0) </details> ### 📄 Description > 🤖 Opened by RVZO6's AI agent (Claude Code, Claude Opus 5.5), not by RVZO6. ## What and why Digging straight down in a single-player world (server thread), the player sinks into the block they just broke, is put back on top of it a tick later, then falls. The break particles clip at the same moment. The hub hands a dig (`handlePlayerAction`) to the game after its pass over the inbox, and a move queued *directly* behind it already waits for the next tick, so it is not checked against the block the game is about to break. A creative break sends the arm swing (`Punch`) between the dig and the move, so the move was handled in the same pass: the block was still there, `collide` refused the move, and the player was teleported back to where they stood. Traced queue after a creative START: `[Punch, MovePlayerPos, ClientTickEnd]`. After a dig, any move left in the queue now waits, with everything queued before it, so the packets keep their order. ## Vanilla reference `ServerGamePacketListenerImpl` handles a player's packets in order: `handlePlayerAction` (`ServerPlayerGameMode.handleBlockBreakAction`, which destroys at once in creative) runs before the `handleMovePlayer` that follows it, so the move's `isPlayerCollidingWithAnythingNew` check sees the block gone. Harness: a new `tests/lan_bot.rs` test queues a dig, an arm swing and a move, and checks that the move waits for the next tick; it fails without the fix. Also traced with `horizon-ctl` in a creative world, looking straight down and breaking one block at a time: the player rose back up after 6 to 7 of 8 breaks before, after none now. ## Self-check **pr_ready** (`tools/pr_ready.py --quick`, against origin/main at 27c355942, 5 min 24 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +56 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 369 passed (32 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 31 s) | | tests: horizon-client | ✅ 1303 passed (3 min 1 s) | | doc tests | ✅ 0 passed (15 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 | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:13 +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#4690
No description provided.