[PR #6070] [MERGED] Explosions push boats and falling blocks, not wind charges #6640

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

📋 Pull Request Information

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

Base: main ← Head: fix/explosions-push-all


📝 Commits (1)

  • 9a696bd Explosions push boats and falling blocks, not wind charges

📊 Changes

3 files changed (+129 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/explosion.rs (+67 -2)
📝 crates/horizon-client/src/projectiles.rs (+4 -0)
📝 tools/lan_e2e.py (+58 -0)

📄 Description

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

What and why

Explosions now break and push boats and push falling blocks, as vanilla does. Before, explosion_hurt_entities skipped both: a boat beside TNT stayed intact and a falling block hung still. Boats take VehicleEntity.hurtServer damage (x10, broken past 40) and the push from their eyes (0.5625); falling blocks take the push from 0.85 of their 0.98 box. A mob's blast spares boats and minecarts while mob griefing is off (VehicleEntity.ignoreExplosion). Wind charges and breeze charges no longer get pushed by an explosion: vanilla leaves their motion at 0 (found on the real server, the earlier push from #5941 moved them).

Fixes #6069

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

ServerExplosion.hurtEntities filters with Entity.ignoreExplosion, overridden only in BlockAttachedEntity, ItemEntity (items only feel block-like blasts, which TNT is) and VehicleEntity; every other entity takes hurtServer then pushFromExplosion. Checked with tools/rea_vanilla.py --jar server-game and by running one scene on the real 26.3 server (tick freeze, tick step 8).
Real server, TNT 2 blocks from each: pushed falling block, thrown potions, bottle, pearl, egg, fireballs, llama spit, rocket, item, arrow; destroyed boat, minecart, orb, armor stand, shulker bullet; not pushed: wind and breeze charges.

Test

python3 tools/lan_e2e.py --check blast-bystanders: TNT beside a falling block, a boat 4 blocks away (breaks) and a boat 7.5 blocks away (survives, pushed). It fails on the unfixed explosion.rs ("the near boat was not broken") and passes with the fix. tools/pr_ready.py --quick passes (1737 client tests, rustfmt, clippy).

Numbers

After 8 ticks, real server vs Horizon:

  • far boat: Pos x 3.0712677 vs 3.0712677, Motion x 0.01308999 vs 0.01308999 (side-by-side dedicated servers, difference under 1e-9); near boat gone and one item dropped on both.
  • falling block: moved (+1.795, +1.235, 0.0) vs (+1.795, +1.235, 0.0) in the lan check, tolerance 0.05.

What was not compared

  • Thrown potions (the vanilla push is measured: Motion (0, 0.30, -0.65)). A command-summoned splash potion never joins Horizon's world, so there was no way to place one; the potions a player throws were not touched. Eyes of ender, evoker fangs and area effect clouds: vanilla stores a push but they do not move, so skipped.
  • Fishing hooks: not summonable, kept per player in Horizon, not touched.
  • Falling block values are read from the server's own list; boat positions in the lan check follow the tracker, so that check asserts direction only (the side-by-side run holds the boat numbers).
  • The wind and breeze charge skip is a one-line filter and was not run on Horizon (the command layer cannot read their motion); the vanilla side is measured.
  • Items, orbs, minecarts, TNT, rockets, tridents and arrows already matched the old code and were left alone; trident motion after the blast was not compared numerically.

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 690f4ca21, 2 min 43 s)

Check Result
Scope ✅ 4 files, +129 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 529 passed (20 s)
rustfmt ✅ (5 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 ✅ (8 s)
tests: horizon-client ✅ 1737 passed (2 min 6 s)
doc tests ✅ 0 passed (1 s)
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 ➖ 323 affected, to run in CI (--quick): arrow, auto_jump, block_removal, boat_paddle_reset, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver and 311 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/6070 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/explosions-push-all` --- ### 📝 Commits (1) - [`9a696bd`](https://github.com/horizon-rust/horizon/commit/9a696bd74b3576dbf785cc8fac0111e4103bd091) Explosions push boats and falling blocks, not wind charges ### 📊 Changes **3 files changed** (+129 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/explosion.rs` (+67 -2) 📝 `crates/horizon-client/src/projectiles.rs` (+4 -0) 📝 `tools/lan_e2e.py` (+58 -0) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why Explosions now break and push boats and push falling blocks, as vanilla does. Before, `explosion_hurt_entities` skipped both: a boat beside TNT stayed intact and a falling block hung still. Boats take `VehicleEntity.hurtServer` damage (x10, broken past 40) and the push from their eyes (0.5625); falling blocks take the push from 0.85 of their 0.98 box. A mob's blast spares boats and minecarts while mob griefing is off (`VehicleEntity.ignoreExplosion`). Wind charges and breeze charges no longer get pushed by an explosion: vanilla leaves their motion at 0 (found on the real server, the earlier push from #5941 moved them). Fixes #6069 ## 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 `ServerExplosion.hurtEntities` filters with `Entity.ignoreExplosion`, overridden only in `BlockAttachedEntity`, `ItemEntity` (items only feel block-like blasts, which TNT is) and `VehicleEntity`; every other entity takes `hurtServer` then `pushFromExplosion`. Checked with `tools/rea_vanilla.py --jar server-game` and by running one scene on the real 26.3 server (`tick freeze`, `tick step 8`). Real server, TNT 2 blocks from each: pushed falling block, thrown potions, bottle, pearl, egg, fireballs, llama spit, rocket, item, arrow; destroyed boat, minecart, orb, armor stand, shulker bullet; not pushed: wind and breeze charges. ## Test `python3 tools/lan_e2e.py --check blast-bystanders`: TNT beside a falling block, a boat 4 blocks away (breaks) and a boat 7.5 blocks away (survives, pushed). It fails on the unfixed explosion.rs ("the near boat was not broken") and passes with the fix. `tools/pr_ready.py --quick` passes (1737 client tests, rustfmt, clippy). ## Numbers After 8 ticks, real server vs Horizon: - far boat: Pos x 3.0712677 vs 3.0712677, Motion x 0.01308999 vs 0.01308999 (side-by-side dedicated servers, difference under 1e-9); near boat gone and one item dropped on both. - falling block: moved (+1.795, +1.235, 0.0) vs (+1.795, +1.235, 0.0) in the lan check, tolerance 0.05. ## What was not compared - Thrown potions (the vanilla push is measured: Motion (0, 0.30, -0.65)). A command-summoned splash potion never joins Horizon's world, so there was no way to place one; the potions a player throws were not touched. Eyes of ender, evoker fangs and area effect clouds: vanilla stores a push but they do not move, so skipped. - Fishing hooks: not summonable, kept per player in Horizon, not touched. - Falling block values are read from the server's own list; boat positions in the lan check follow the tracker, so that check asserts direction only (the side-by-side run holds the boat numbers). - The wind and breeze charge skip is a one-line filter and was not run on Horizon (the command layer cannot read their motion); the vanilla side is measured. - Items, orbs, minecarts, TNT, rockets, tridents and arrows already matched the old code and were left alone; trident motion after the blast was not compared numerically. 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 690f4ca21, 2 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +129 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 529 passed (20 s) | | rustfmt | ✅ (5 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 | ✅ (8 s) | | tests: horizon-client | ✅ 1737 passed (2 min 6 s) | | doc tests | ✅ 0 passed (1 s) | | 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 | ➖ 323 affected, to run in CI (--quick): arrow, auto_jump, block_removal, boat_paddle_reset, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver and 311 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>
bsakaguchi 2026-11-03 06:24:11 +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#6640
No description provided.