[PR #6414] [MERGED] Pistons and shulker lids push falling blocks, XP orbs and projectiles #6856

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

📋 Pull Request Information

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

Base: main ← Head: fix/piston-push-entities


📝 Commits (3)

  • 326a9f6 Pistons and shulker lids push falling blocks, XP orbs, projectiles, rockets and tridents
  • 534c6ee lan_e2e: piston-entities check for a falling block and an arrow in a piston's way
  • 6578a0a Merge remote-tracking branch 'origin/main' into fix/piston-push-entities

📊 Changes

2 files changed (+152 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/piston_push.rs (+116 -0)
📝 tools/lan_e2e.py (+36 -2)

📄 Description

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

What and why

A moving piston (and a shulker box lid) only pushed players, mobs, dropped items, boats, minecarts, armor stands and primed TNT. Falling blocks, XP orbs, arrows and other projectiles, firework rockets and thrown tridents stood still while the block moved through them. Vanilla pushes every entity the moving block meets.

Changed: crates/horizon-client/src/game/piston_push.rs (five new push targets, including the slime block bounce) and a piston-entities check in tools/lan_e2e.py.

Fixes #6413

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

PistonMovingBlockEntity.moveCollidedEntities and ShulkerBoxBlockEntity.moveCollidedEntities move every entity from getEntities except those whose getPistonPushReaction() is IGNORE_ENTITY; only ArmorStand overrides it (markers). Read from the shipped bytecode.

Numbers

Side-by-side scene piston_entities (vanilla dedicated server vs Horizon dedicated server, one piston per entity, run twice on vanilla to drop noise), 48 probed values (Pos, Motion, count at 4 times):

values matching vanilla
Horizon before 36 / 48
Horizon after 48 / 48

Before, after the push: falling block x -6.5 (vanilla -5.5), arrow x -6.5 (vanilla -5.74), XP orb x -6.5 (vanilla -5.74). After the fix all three match vanilla. Vanilla moved 5 of 12 probed values, so the scene exercises the push.

lan_e2e.py --check piston-entities (host + guest): falling block moves 1.0 blocks and the arrow 0.76 with the fix; without it the check fails (piston did not push falling_block: 9.5 -> 9.5).

What wasn't compared

  • Firework rockets and thrown tridents: a Horizon dedicated server cannot /summon them (and @e does not see them), so they are pushed by the same code but not measured against vanilla. Shulker lids use the same targets and were not run separately.
  • Slime block bounce for the new kinds was not measured.

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 f4833621f, 3 min 21 s)

Check Result
Scope ✅ 2 files, +152 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (29 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 22 s)
tests: horizon-client ✅ 585 passed (1 min 19 s)
doc tests ✅ 0 passed (3 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 ➖ not run (--quick): CI's parity job picks the affected harnesses
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/6414 **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/piston-push-entities` --- ### 📝 Commits (3) - [`326a9f6`](https://github.com/horizon-rust/horizon/commit/326a9f6241060ca1f41873c8b81d4281fa9333c2) Pistons and shulker lids push falling blocks, XP orbs, projectiles, rockets and tridents - [`534c6ee`](https://github.com/horizon-rust/horizon/commit/534c6ee1141c59ce26096248ec27854d8d056be5) lan_e2e: piston-entities check for a falling block and an arrow in a piston's way - [`6578a0a`](https://github.com/horizon-rust/horizon/commit/6578a0abfda327964174b69d767a3cd540de88c7) Merge remote-tracking branch 'origin/main' into fix/piston-push-entities ### 📊 Changes **2 files changed** (+152 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/piston_push.rs` (+116 -0) 📝 `tools/lan_e2e.py` (+36 -2) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why A moving piston (and a shulker box lid) only pushed players, mobs, dropped items, boats, minecarts, armor stands and primed TNT. Falling blocks, XP orbs, arrows and other projectiles, firework rockets and thrown tridents stood still while the block moved through them. Vanilla pushes every entity the moving block meets. Changed: `crates/horizon-client/src/game/piston_push.rs` (five new push targets, including the slime block bounce) and a `piston-entities` check in `tools/lan_e2e.py`. Fixes #6413 ## 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 `PistonMovingBlockEntity.moveCollidedEntities` and `ShulkerBoxBlockEntity.moveCollidedEntities` move every entity from `getEntities` except those whose `getPistonPushReaction()` is `IGNORE_ENTITY`; only `ArmorStand` overrides it (markers). Read from the shipped bytecode. ## Numbers Side-by-side scene `piston_entities` (vanilla dedicated server vs Horizon dedicated server, one piston per entity, run twice on vanilla to drop noise), 48 probed values (Pos, Motion, count at 4 times): | | values matching vanilla | |---|---| | Horizon before | 36 / 48 | | Horizon after | 48 / 48 | Before, after the push: falling block x -6.5 (vanilla -5.5), arrow x -6.5 (vanilla -5.74), XP orb x -6.5 (vanilla -5.74). After the fix all three match vanilla. Vanilla moved 5 of 12 probed values, so the scene exercises the push. `lan_e2e.py --check piston-entities` (host + guest): falling block moves 1.0 blocks and the arrow 0.76 with the fix; without it the check fails (`piston did not push falling_block: 9.5 -> 9.5`). ## What wasn't compared - Firework rockets and thrown tridents: a Horizon dedicated server cannot `/summon` them (and `@e` does not see them), so they are pushed by the same code but not measured against vanilla. Shulker lids use the same targets and were not run separately. - Slime block bounce for the new kinds was not measured. 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 f4833621f, 3 min 21 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +152 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (29 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 22 s) | | tests: horizon-client | ✅ 585 passed (1 min 19 s) | | doc tests | ✅ 0 passed (3 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 | ➖ not run (--quick): CI's parity job picks the affected harnesses | | 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:28:10 +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#6856
No description provided.