[PR #7812] Wind pushes land on the tick vanilla gives them for TNT, falling blocks and orbs #7839

Open
opened 2026-11-03 07:25:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7812
Author: @HrafnaValkyrja
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/wind-gaps


📝 Commits (3)

  • 150c00e Wind bursts push late-ticking kinds after their own tick
  • 460663a Merge remote-tracking branch 'origin/main' into fix/wind-gaps
  • be79f20 Merge remote-tracking branch 'origin/main' into fix/wind-gaps

📊 Changes

4 files changed (+86 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+7 -0)
📝 crates/horizon-client/src/game/entity.rs (+14 -0)
📝 crates/horizon-client/src/game/wind.rs (+64 -2)

📄 Description

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

This is a stop-gap: it holds the push for the three kinds that tick after projectiles, and goes away when every kind ticks in join order as vanilla does (#6509). Until then wind_late stays at 87 of 99.

A wind burst pushes primed TNT, falling blocks and experience orbs after their own tick

What was wrong

Six values of the wind_walk side-by-side scene differed from the real server on current main: the position and motion of primed TNT, a falling block and an experience orb pushed by a wind charge. The push arrived one tick early (after 8 ticks the TNT was 0.437 blocks off in x, 0.410 in y; its motion 0.4282 against 0.4369, one extra drag step of 0.98).

Cause: vanilla ticks the entities of a level in the order they joined. A TNT, block or orb that joined before the charge has already moved when the charge bursts, so the push is for its next tick. Horizon ticks per kind, and these three kinds tick after the projectiles, so the push landed before their move. wind_knockback in game/wind.rs now holds the push of such an entity (kind ticks after projectiles, id below the charge's) until tick_tnt has run, then applies it (apply_late_wind_pushes, called in tick_world).

Fixes #7810

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

Checked with tools/rea_vanilla.py --jar server-game on the pinned 26.3 jar.

  • AbstractWindCharge.onHitBlock / onHitEntity call explode(position) inside the charge's own tick; AbstractWindCharge.push does nothing, so the charge is never moved by a burst.
  • ServerExplosion.hurtEntities pushes every other entity with Entity.push, which adds to its delta movement; whether that falls before or after the entity's tick depends on where the entity sits in ServerLevel's tick list (join order).

Proof

Beside the real 26.3 server (sbs.py, flat world, every entity in a ticking chunk, tolerance 1e-6, vanilla run twice with --noise):

scene before (main) after
wind_walk 93 of 99 99 of 99
wind_breeze not remeasured before 99 of 99
wind_scaled (baby and slime cases included) not remeasured before 624 of 624
blast_scaled (baby and slime cases included) not remeasured before 624 of 624

Control, wind_late (the charges are summoned before the other entities, so vanilla pushes first): 87 of 99 before and after. The TNT, block and orb values match there both ways, which shows the order is the cause. The 12 values that differ in that scene are entities of kinds that tick before the projectiles here (tridents, rockets, arrows, boats, minecarts, snowballs) and joined after the charge. They are left: fixing them needs one tick order for every kind (the entity-walk design, #6509), not a patch for wind.

Not covered: explosions from primed TNT have the same order question; blast_scaled only holds mobs and stands, so it does not measure it.

Unit test: game::wind::tests::a_push_waits_only_for_late_ticking_kinds_that_joined_before_the_charge passes. It tests the rule and the three kinds' flag, and cannot fail by reverting alone (it needs the new function); the scene numbers above are the before and after.

Harnesses

python3 tools/parity.py --fresh mace arrow_wind_charge pearl_wind_charge dispenser with DISPLAY=:0 HORIZON_E2E_HEADLESS=1: 4 passed, 0 failed. There is no harness for wind-pushed TNT or an explosion on its own.
python3 tools/pr_ready.py --quick: Python tests, rustfmt, clippy, horizon-client tests (712), doc tests and mod API all pass; the 222 affected parity harnesses are left to CI.

Proved by script against the real 26.3 server; no human played this change.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on Valhalla, against origin/main at f1d6576b3, 4 min 38 s)

Check Result
Scope ✅ 4 files, +86 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (30 s)
rustfmt ✅ (7 s)
Rust ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 46 s)
tests: horizon-client ✅ 712 passed (1 min 54 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ✅ (15 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 222 affected, to run in CI (--quick): anvil_turtle_egg, armor_stand_turtle_egg, arrow, arrow_wind_charge, block_particles, block_removal, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, command_exec, composter and 210 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code

https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m


🔄 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/7812 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/wind-gaps` --- ### 📝 Commits (3) - [`150c00e`](https://github.com/horizon-rust/horizon/commit/150c00e2cbf4c0daf818e546d36918362ef22be4) Wind bursts push late-ticking kinds after their own tick - [`460663a`](https://github.com/horizon-rust/horizon/commit/460663ab7cb9a4d3d54bb1bfe8e9c5243675e040) Merge remote-tracking branch 'origin/main' into fix/wind-gaps - [`be79f20`](https://github.com/horizon-rust/horizon/commit/be79f209baed0285328dc5278147f986c73b2d57) Merge remote-tracking branch 'origin/main' into fix/wind-gaps ### 📊 Changes **4 files changed** (+86 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+7 -0) 📝 `crates/horizon-client/src/game/entity.rs` (+14 -0) 📝 `crates/horizon-client/src/game/wind.rs` (+64 -2) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. This is a stop-gap: it holds the push for the three kinds that tick after projectiles, and goes away when every kind ticks in join order as vanilla does (#6509). Until then `wind_late` stays at 87 of 99. # A wind burst pushes primed TNT, falling blocks and experience orbs after their own tick ## What was wrong Six values of the `wind_walk` side-by-side scene differed from the real server on current main: the position and motion of primed TNT, a falling block and an experience orb pushed by a wind charge. The push arrived one tick early (after 8 ticks the TNT was 0.437 blocks off in x, 0.410 in y; its motion 0.4282 against 0.4369, one extra drag step of 0.98). Cause: vanilla ticks the entities of a level in the order they joined. A TNT, block or orb that joined before the charge has already moved when the charge bursts, so the push is for its next tick. Horizon ticks per kind, and these three kinds tick after the projectiles, so the push landed before their move. `wind_knockback` in `game/wind.rs` now holds the push of such an entity (kind ticks after projectiles, id below the charge's) until `tick_tnt` has run, then applies it (`apply_late_wind_pushes`, called in `tick_world`). Fixes #7810 ## 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 Checked with `tools/rea_vanilla.py --jar server-game` on the pinned 26.3 jar. - `AbstractWindCharge.onHitBlock` / `onHitEntity` call `explode(position)` inside the charge's own tick; `AbstractWindCharge.push` does nothing, so the charge is never moved by a burst. - `ServerExplosion.hurtEntities` pushes every other entity with `Entity.push`, which adds to its delta movement; whether that falls before or after the entity's `tick` depends on where the entity sits in `ServerLevel`'s tick list (join order). ## Proof Beside the real 26.3 server (`sbs.py`, flat world, every entity in a ticking chunk, tolerance 1e-6, vanilla run twice with `--noise`): | scene | before (main) | after | |---|---|---| | `wind_walk` | 93 of 99 | 99 of 99 | | `wind_breeze` | not remeasured before | 99 of 99 | | `wind_scaled` (baby and slime cases included) | not remeasured before | 624 of 624 | | `blast_scaled` (baby and slime cases included) | not remeasured before | 624 of 624 | Control, `wind_late` (the charges are summoned before the other entities, so vanilla pushes first): 87 of 99 before and after. The TNT, block and orb values match there both ways, which shows the order is the cause. The 12 values that differ in that scene are entities of kinds that tick before the projectiles here (tridents, rockets, arrows, boats, minecarts, snowballs) and joined after the charge. They are left: fixing them needs one tick order for every kind (the entity-walk design, #6509), not a patch for wind. Not covered: explosions from primed TNT have the same order question; `blast_scaled` only holds mobs and stands, so it does not measure it. Unit test: `game::wind::tests::a_push_waits_only_for_late_ticking_kinds_that_joined_before_the_charge` passes. It tests the rule and the three kinds' flag, and cannot fail by reverting alone (it needs the new function); the scene numbers above are the before and after. ## Harnesses `python3 tools/parity.py --fresh mace arrow_wind_charge pearl_wind_charge dispenser` with `DISPLAY=:0 HORIZON_E2E_HEADLESS=1`: 4 passed, 0 failed. There is no harness for wind-pushed TNT or an explosion on its own. `python3 tools/pr_ready.py --quick`: Python tests, rustfmt, clippy, horizon-client tests (712), doc tests and mod API all pass; the 222 affected parity harnesses are left to CI. Proved by script against the real 26.3 server; no human played this change. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Valhalla, against origin/main at f1d6576b3, 4 min 38 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +86 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (30 s) | | rustfmt | ✅ (7 s) | | Rust | ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 46 s) | | tests: horizon-client | ✅ 712 passed (1 min 54 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (15 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 222 affected, to run in CI (--quick): anvil_turtle_egg, armor_stand_turtle_egg, arrow, arrow_wind_charge, block_particles, block_removal, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, command_exec, composter and 210 more | | 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) https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7839
No description provided.