[PR #6042] [MERGED] Freeze client block entities between stepped ticks #6623

Closed
opened 2026-11-03 06:23:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6042
Author: @oskal675-design
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/piston-tick-step


📝 Commits (1)

  • d178759 Freeze client block entities between stepped world ticks

📊 Changes

2 files changed (+162 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+15 -13)
➕ tools/piston_step_e2e.py (+147 -0)

📄 Description

🤖 Opened by oskal675-design's AI agent (Codex, GPT-6), not by oskal675-design personally.

What and why

A Horizon client kept ticking block entities while its server was frozen. After /tick step 1, a moving piston advanced through the rest of its animation during the following frozen client ticks and replaced itself with the final block. Against an actual vanilla server, the client already showed stone while the server still held the moving-piston block entity.

Gate the existing client block-entity ticker group on the same runsNormally result used for world time/entities. A step now advances it once; block entities remain frozen between steps. This also keeps the other client block-entity tickers on vanilla's shared rule.

Part of #5977 — client timing only. The server-side step count and packet ordering are addressed separately in #6063. Both changes were tested together. Extra moving-block updates were observed separately; their causal role was not established. Claimed and assigned before implementation.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Read actual 26.3 Level.tickBlockEntities (tickers run only when tickRateManager().runsNormally()) and PistonMovingBlockEntity.tick with tools/rea_vanilla.py.

tools/piston_step_e2e.py runs a real vanilla dedicated server and a Horizon graphical client in isolated homes. It checks 18 snapshots: east/up sticky-piston extension and retraction, power changes while frozen, and unfreeze controls. Each frozen snapshot waits 20 client ticks and verifies unchanged server game time. Native block-state commands and saved piston progress (0.0/0.5) independently establish the server's stage; the client must retain moving_piston on steps 1 and 2 and show the placed stone on step 3. Screenshots also show the half/full movement stages.

Pre-fix: 10/18 snapshots pass (8 premature completions). Fixed: 18/18 pass.

Tested on main e6eed3e11. This wraps the existing calls in remote.rs; it does not edit block_entity_anims.rs or require #5997's shulker changes. No combined checkout with that open PR was run.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on omarchy, against origin/main at e6eed3e11, 4 min 25 s)

Check Result
Scope ✅ 2 files, +162 −13
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 523 passed (21 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 9 s)
tests: horizon-client ✅ 1709 passed (2 min 46 s)
doc tests ✅ 0 passed
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 ➖ 318 affected, to run in CI (--quick): blending, block_removal, block_survival, boat_paddle_reset, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen and 306 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Additional verification:

python3 tools/piston_step_e2e.py --game launcher/target/fast/horizon-client --ctl launcher/target/fast/horizon-ctl --output .local/piston-step-e2e-after
# 18/18 client piston snapshots match vanilla
python3 tools/port_ledger.py check --base origin/main
# No new gaps or stale citations

The live check requires built binaries, prepared 26.3 resources and graphical/offscreen support. All worlds/homes are fresh scratch data.

Screenshots

After the first server step and 20 more frozen client ticks:

Before: placed stone too early
After: half-extension retained

After the second server step (still a moving block entity):

Second step

Please allow maintainer edits.

🤖 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/6042 **Author:** [@oskal675-design](https://github.com/oskal675-design) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/piston-tick-step` --- ### 📝 Commits (1) - [`d178759`](https://github.com/horizon-rust/horizon/commit/d1787596daaa66e14c32d6390d2fd959ebf6beea) Freeze client block entities between stepped world ticks ### 📊 Changes **2 files changed** (+162 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+15 -13) ➕ `tools/piston_step_e2e.py` (+147 -0) </details> ### 📄 Description > 🤖 Opened by oskal675-design's AI agent (Codex, GPT-6), not by oskal675-design personally. ## What and why A Horizon client kept ticking block entities while its server was frozen. After `/tick step 1`, a moving piston advanced through the rest of its animation during the following frozen client ticks and replaced itself with the final block. Against an actual vanilla server, the client already showed stone while the server still held the moving-piston block entity. Gate the existing client block-entity ticker group on the same `runsNormally` result used for world time/entities. A step now advances it once; block entities remain frozen between steps. This also keeps the other client block-entity tickers on vanilla's shared rule. **Part of #5977 — client timing only.** The server-side step count and packet ordering are addressed separately in #6063. Both changes were tested together. Extra moving-block updates were observed separately; their causal role was not established. Claimed and assigned before implementation. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Read actual 26.3 `Level.tickBlockEntities` (tickers run only when `tickRateManager().runsNormally()`) and `PistonMovingBlockEntity.tick` with `tools/rea_vanilla.py`. `tools/piston_step_e2e.py` runs a real vanilla dedicated server and a Horizon graphical client in isolated homes. It checks 18 snapshots: east/up sticky-piston extension and retraction, power changes while frozen, and unfreeze controls. Each frozen snapshot waits 20 client ticks and verifies unchanged server game time. Native block-state commands and saved piston progress (`0.0`/`0.5`) independently establish the server's stage; the client must retain `moving_piston` on steps 1 and 2 and show the placed stone on step 3. Screenshots also show the half/full movement stages. Pre-fix: 10/18 snapshots pass (8 premature completions). Fixed: 18/18 pass. Tested on main `e6eed3e11`. This wraps the existing calls in `remote.rs`; it does not edit `block_entity_anims.rs` or require #5997's shulker changes. No combined checkout with that open PR was run. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on omarchy, against origin/main at e6eed3e11, 4 min 25 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +162 −13 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 523 passed (21 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 9 s) | | tests: horizon-client | ✅ 1709 passed (2 min 46 s) | | doc tests | ✅ 0 passed | | 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 | ➖ 318 affected, to run in CI (--quick): blending, block_removal, block_survival, boat_paddle_reset, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen and 306 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Additional verification: ```sh python3 tools/piston_step_e2e.py --game launcher/target/fast/horizon-client --ctl launcher/target/fast/horizon-ctl --output .local/piston-step-e2e-after # 18/18 client piston snapshots match vanilla python3 tools/port_ledger.py check --base origin/main # No new gaps or stale citations ``` The live check requires built binaries, prepared 26.3 resources and graphical/offscreen support. All worlds/homes are fresh scratch data. ## Screenshots After the first server step and 20 more frozen client ticks: ![Before: placed stone too early](https://raw.githubusercontent.com/oskal675-design/horizon/9310fe253497726232fea8ede79acfd31fdd8833/before.png) ![After: half-extension retained](https://raw.githubusercontent.com/oskal675-design/horizon/9310fe253497726232fea8ede79acfd31fdd8833/after.png) After the second server step (still a moving block entity): ![Second step](https://raw.githubusercontent.com/oskal675-design/horizon/9310fe253497726232fea8ede79acfd31fdd8833/after-step-2.png) Please allow maintainer edits. 🤖 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 06:23:56 +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#6623
No description provided.