[PR #1149] [MERGED] Other players' block cracks are drawn #3095

Closed
opened 2026-11-02 16:01:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1149
Author: @ludovic111
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: fix/others-breaking-progress


📝 Commits (1)

  • c4d6b34 Other players' block cracks are drawn

📊 Changes

11 files changed (+294 additions, -90 deletions)

View changed files

📝 crates/horizon-client/examples/breaking_fixture.rs (+4 -2)
📝 crates/horizon-client/src/block_entity_render.rs (+11 -4)
📝 crates/horizon-client/src/breaking.rs (+47 -9)
📝 crates/horizon-client/src/entity.wgsl (+4 -2)
📝 crates/horizon-client/src/game.rs (+88 -56)
📝 crates/horizon-client/src/game/control.rs (+7 -0)
📝 crates/horizon-client/src/game/lan.rs (+3 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+75 -13)
📝 crates/horizon-client/src/game/remote.rs (+4 -0)
📝 crates/horizon-client/src/gfx.rs (+4 -2)
📝 tools/lan_e2e.py (+47 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #1096. Reported by Tydragon00: thanks!

What

On a server or a world open to LAN, a player saw only their own crack. The server sent each new stage to the others (ClientboundBlockDestruction), but a client of a server ignored the packet, and the host of a LAN world neither drew its guests' cracks nor sent its own.

Vanilla keeps the cracks per breaker (ClientLevel.destroyBlockProgress: a progress outside 0..9 removes it; 400 ticks without news drop it) and draws, within 32 blocks, the furthest one on each block (LevelExtractor.extractBlockDestroyAnimation). Horizon now does the same: a client of a server takes the packet, a LAN host records its guests' stages and sends its own (each new stage, then -1 when it stops), and every crack is drawn with its own stage. A guest's crack also goes when the block it digs is gone before its STOP_DESTROY_BLOCK (its own tick broke it), as ServerPlayerGameMode.tick clears it on air; the others used to keep its last stage for 400 ticks. Each crack vertex carries its stage sprite's atlas origin in its light bytes (the crumbling pass is unlit); the shader keeps the shared sprite size.

The issue's other items

Not reproduced on main, with a dedicated server and two clients (a probe on the Mac mini):

  • Freeze when placing blocks: the client kept 20.24 TPS; a crafting table placed in 1.2 s and both players saw it, no server errors.
  • Animation speed: while mining, 16 swings in 63 ticks, vanilla's one every 4 ticks.
  • Swimming: 4 s forward moved about 6.6 blocks; forward and jump climbed out of the pool.
    If it still happens, please tell us the server (Horizon's or vanilla's), the block and what you held.

Proof

tools/lan_e2e.py --check cracks (new): each side watches the block the other mines and sees its crack grow (at least three rising stages each way); once the blocks break no crack is left on either side. Passes in-frame and --server-thread; the screenshots from both sides show the cracks. tools/parity.py breaking_model passes (its fixture passes a stage origin now). A scratch probe breaking a block three times as the guest left no crack on the host in either mode (before: a stage 8 left on the first break).

Self-check

All 18 B5 branches merged on one integration commit over origin/main b31cb422 (Mac mini):

cargo fmt --all --check                                                  ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings   exit 0, no ^error
cargo test -p horizon-client                                             1087 passed, 0 failed
python3 tools/parity.py --changed origin/main                            102 passed, 0 failed (over b7390d78)
python3 tools/parity.py --changed-files <explosion.rs>                   22 passed, 0 failed (over b31cb422, after rebasing onto #1101)

tools/lan_e2e.py, full runs over b31cb422 (48 checks):

  • --server-thread: 47 passed; swings (the guest's hoe) failed after earlier checks and passes alone.
  • in-frame: 44 passed. cracks caught a guest's crack left behind when its own tick broke the block (fixed in the cracks PR; swings then cracks and a 3-break probe now pass in both modes). barter (piglin gone), swings and effects fail only after earlier checks and pass alone.
  • sign (not touched here) fails about 1 run in 4, on main too: place reports 2 ticks after the click, sometimes before the server's answer. Noted in FEATURES.md with the other flakes.

🤖 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/1149 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/others-breaking-progress` --- ### 📝 Commits (1) - [`c4d6b34`](https://github.com/horizon-rust/horizon/commit/c4d6b341724103a581cc41e461615c568fdd8c41) Other players' block cracks are drawn ### 📊 Changes **11 files changed** (+294 additions, -90 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/breaking_fixture.rs` (+4 -2) 📝 `crates/horizon-client/src/block_entity_render.rs` (+11 -4) 📝 `crates/horizon-client/src/breaking.rs` (+47 -9) 📝 `crates/horizon-client/src/entity.wgsl` (+4 -2) 📝 `crates/horizon-client/src/game.rs` (+88 -56) 📝 `crates/horizon-client/src/game/control.rs` (+7 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+3 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+75 -13) 📝 `crates/horizon-client/src/game/remote.rs` (+4 -0) 📝 `crates/horizon-client/src/gfx.rs` (+4 -2) 📝 `tools/lan_e2e.py` (+47 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1096. Reported by **Tydragon00**: thanks! ## What On a server or a world open to LAN, a player saw only their own crack. The server sent each new stage to the others (`ClientboundBlockDestruction`), but a client of a server ignored the packet, and the host of a LAN world neither drew its guests' cracks nor sent its own. Vanilla keeps the cracks per breaker (`ClientLevel.destroyBlockProgress`: a progress outside 0..9 removes it; 400 ticks without news drop it) and draws, within 32 blocks, the furthest one on each block (`LevelExtractor.extractBlockDestroyAnimation`). Horizon now does the same: a client of a server takes the packet, a LAN host records its guests' stages and sends its own (each new stage, then -1 when it stops), and every crack is drawn with its own stage. A guest's crack also goes when the block it digs is gone before its `STOP_DESTROY_BLOCK` (its own tick broke it), as `ServerPlayerGameMode.tick` clears it on air; the others used to keep its last stage for 400 ticks. Each crack vertex carries its stage sprite's atlas origin in its light bytes (the crumbling pass is unlit); the shader keeps the shared sprite size. ## The issue's other items Not reproduced on main, with a dedicated server and two clients (a probe on the Mac mini): - **Freeze when placing blocks:** the client kept 20.24 TPS; a crafting table placed in 1.2 s and both players saw it, no server errors. - **Animation speed:** while mining, 16 swings in 63 ticks, vanilla's one every 4 ticks. - **Swimming:** 4 s forward moved about 6.6 blocks; forward and jump climbed out of the pool. If it still happens, please tell us the server (Horizon's or vanilla's), the block and what you held. ## Proof `tools/lan_e2e.py --check cracks` (new): each side watches the block the other mines and sees its crack grow (at least three rising stages each way); once the blocks break no crack is left on either side. Passes in-frame and `--server-thread`; the screenshots from both sides show the cracks. `tools/parity.py breaking_model` passes (its fixture passes a stage origin now). A scratch probe breaking a block three times as the guest left no crack on the host in either mode (before: a stage 8 left on the first break). ### Self-check All 18 B5 branches merged on one integration commit over origin/main `b31cb422` (Mac mini): ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0, no ^error cargo test -p horizon-client 1087 passed, 0 failed python3 tools/parity.py --changed origin/main 102 passed, 0 failed (over b7390d78) python3 tools/parity.py --changed-files <explosion.rs> 22 passed, 0 failed (over b31cb422, after rebasing onto #1101) ``` `tools/lan_e2e.py`, full runs over `b31cb422` (48 checks): - `--server-thread`: 47 passed; `swings` (the guest's hoe) failed after earlier checks and passes alone. - in-frame: 44 passed. `cracks` caught a guest's crack left behind when its own tick broke the block (fixed in the cracks PR; `swings` then `cracks` and a 3-break probe now pass in both modes). `barter` (piglin gone), `swings` and `effects` fail only after earlier checks and pass alone. - `sign` (not touched here) fails about 1 run in 4, on main too: `place` reports 2 ticks after the click, sometimes before the server's answer. Noted in FEATURES.md with the other flakes. 🤖 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-02 16:01:28 +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#3095
No description provided.