[PR #4787] [MERGED] Fix ghost block when placing falling blocks next to each other #5850

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4787
Author: @WooCaash
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/4510-falling-block-ghost


📝 Commits (3)

  • e115843 Fix ghost sand when placing falling blocks next to each other.
  • d692215 Fix LAN packet phase lifecycle
  • a56109f Merge remote-tracking branch 'origin/main' into sweepB/4787

📊 Changes

4 files changed (+248 additions, -123 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -0)
📝 crates/horizon-client/src/game/lan.rs (+226 -119)
📝 crates/horizon-client/src/game/levels.rs (+4 -0)
📝 crates/horizon-client/src/lan/hub.rs (+15 -4)

📄 Description

🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally.

Summary

  • On the server thread, player packets were handled in tick_lan after scheduled block ticks, so a fast second sand place in the same tick as the first sand's fall schedule often saw air and was refused — the client prediction then rolled back (ghost).
  • Drain hub packets before tick_blocks (tick_lan_packets / Hub::drain_packets), matching vanilla's packet-before-block order within the tick. Fixes #4510.

Test plan

  • Single player (server thread): place sand next to a solid block in the air, then quickly place another sand on/against it — both should place and fall; no brief solid ghost that vanishes.
  • Repeat with gravel.
  • Normal block place / break still feel correct on the server thread.

Made with Cursor


🔄 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/4787 **Author:** [@WooCaash](https://github.com/WooCaash) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/4510-falling-block-ghost` --- ### 📝 Commits (3) - [`e115843`](https://github.com/horizon-rust/horizon/commit/e115843756cf2765f3e66dfb40e496e80df62179) Fix ghost sand when placing falling blocks next to each other. - [`d692215`](https://github.com/horizon-rust/horizon/commit/d6922153619aa3edc32afb3cfffb044279869745) Fix LAN packet phase lifecycle - [`a56109f`](https://github.com/horizon-rust/horizon/commit/a56109fc756fa1d2aa8b073999ba25c521748d55) Merge remote-tracking branch 'origin/main' into sweepB/4787 ### 📊 Changes **4 files changed** (+248 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+226 -119) 📝 `crates/horizon-client/src/game/levels.rs` (+4 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+15 -4) </details> ### 📄 Description > 🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally. ## Summary - On the server thread, player packets were handled in `tick_lan` *after* scheduled block ticks, so a fast second sand place in the same tick as the first sand's fall schedule often saw air and was refused — the client prediction then rolled back (ghost). - Drain hub packets before `tick_blocks` (`tick_lan_packets` / `Hub::drain_packets`), matching vanilla's packet-before-block order within the tick. Fixes #4510. ## Test plan - [ ] Single player (server thread): place sand next to a solid block in the air, then quickly place another sand on/against it — both should place and fall; no brief solid ghost that vanishes. - [ ] Repeat with gravel. - [ ] Normal block place / break still feel correct on the server thread. Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:26 +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#5850
No description provided.