[PR #2484] [MERGED] Stop being sent back when you break the block under your feet #4359

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2484
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/2463-break-block-lagback


📝 Commits (1)

  • 9474816 Handle a dig packet before the move queued behind it

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/lan/hub.rs (+14 -0)

📄 Description

What and why

Breaking the block you stand on sent you back for a moment before you fell (a melon, for example).

The client removes the block at once and starts to fall in the same tick, so the dig packet and the first move packet arrive together. The hub handled the move straight away, but a dig packet is only handled by the game after the hub has gone through all of the packets. So the move was checked against the block that was still there, counted as "moved wrongly" and the player was teleported back. A moment later the block broke and the player fell.

Now, when a move is waiting right behind a dig packet, the hub stops there and handles the move on the next tick, after the break. The two packets are handled in order, as in vanilla. This applies to single player and to servers.

Fixes #2463.

Vanilla reference

  • ServerGamePacketListenerImpl.handlePlayerAction and handleMovePlayer, which run in the order the packets arrive.
  • ServerPlayerGameMode.handleBlockBreakAction.

Self-check

cargo check -p horizon-client passes.


🔄 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/2484 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2463-break-block-lagback` --- ### 📝 Commits (1) - [`9474816`](https://github.com/horizon-rust/horizon/commit/94748162bc6103baa74ce633b88b702bebfb5923) Handle a dig packet before the move queued behind it ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/hub.rs` (+14 -0) </details> ### 📄 Description ## What and why Breaking the block you stand on sent you back for a moment before you fell (a melon, for example). The client removes the block at once and starts to fall in the same tick, so the dig packet and the first move packet arrive together. The hub handled the move straight away, but a dig packet is only handled by the game after the hub has gone through all of the packets. So the move was checked against the block that was still there, counted as "moved wrongly" and the player was teleported back. A moment later the block broke and the player fell. Now, when a move is waiting right behind a dig packet, the hub stops there and handles the move on the next tick, after the break. The two packets are handled in order, as in vanilla. This applies to single player and to servers. Fixes #2463. ## Vanilla reference - `ServerGamePacketListenerImpl.handlePlayerAction` and `handleMovePlayer`, which run in the order the packets arrive. - `ServerPlayerGameMode.handleBlockBreakAction`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:35 +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#4359
No description provided.