[PR #6631] [MERGED] Armor stands crack the turtle eggs they stand or land on #6998

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6631
Author: @Ragbie
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/armor-stand-turtle-eggs


📝 Commits (6)

  • 5f1c085 Armor stands crack the turtle eggs they stand or land on
  • fb2c9f5 Armor stands: the egg under them is their supporting block's
  • fb7006f Armor stand egg harness: the edge stand drops off the single egg
  • 4d38650 Armor stands: rustfmt
  • 701d1a6 Merge main into #6631
  • 3442798 Merge main into #6631

📊 Changes

5 files changed (+219 additions, -28 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+36 -0)
📝 crates/horizon-client/src/game.rs (+1 -1)
📝 crates/horizon-client/src/game/armor_stands.rs (+49 -4)
📝 crates/horizon-client/src/game/creatures.rs (+26 -23)
➕ tools/test_armor_stand_turtle_egg_parity.py (+107 -0)

📄 Description

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

What and why

An armor stand is a LivingEntity, so vanilla's TurtleEggBlock cracks the eggs it stands or lands on while mob griefing is on (canDestroyEgg): stepOn one tick in 100, fallOn one landing in 3. Horizon's armor stand tick ran neither, so a stand could stand on eggs forever (the armor stand point of #5858).

  • game/armor_stands.rs: after the stand's move, fallOn's roll on a landing, then stepOn's, each re-reading the block, on the level's random, only where the server runs (not on a remote client). The landing's location effects now run before them, as LivingEntity.checkFallDamage calls onChangedBlock before fallOn.
  • entities.rs: the stand keeps Entity.setOnGroundWithMovement's supporting block (GroundState with find_supporting_block, as the player does), and ArmorStand::on_pos_legacy is getOnPos(0.2): the supporting block's column, so a stand whose centre is past the egg's edge still stands on it.
  • game/creatures.rs: the mobs' egg crack (decreaseEggs) moves into Game::crack_turtle_egg, used by both.

Part of #5858 (the anvil drop point stays open; placement particles and the player's trample are already on main).

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

TurtleEggBlock.stepOn, fallOn, destroyEgg, canDestroyEgg, decreaseEggs, getShape; LivingEntity.aiStep (travel, then applyEffectsFromBlocks); Entity.applyEffectsFromBlocks(List), move, checkFallDamage, checkSupportingBlock, getOnPos(float), getOnPosLegacy; CollisionGetter.findSupportingBlock; ArmorStand.travel, hasPhysics (read with tools/rea_vanilla.py).

New harness tools/test_armor_stand_turtle_egg_parity.py (real vanilla and Horizon servers): stands on four eggs for 1500 ticks with mob griefing on (fewer than four cracks: about 2 in 10000), a small stand, a marker stand (never lands, eggs stay), an egg with no stand, a stand whose centre is past the egg's edge (three cracks, then the single egg's narrower shape drops it to the stone, so one egg stays), and a stand with mob griefing off.

  • Before the change: -stand-check fail / +stand-check pass, same for small-stand.
  • Before the supporting-block part: -edge-stand-check pass / +edge-stand-check fail.
  • After: armor-stand turtle eggs: 6 results match vanilla.

In game (Windows 11, horizon-ctl, offscreen): a stand on four eggs next to a second stack of four; after 1500 ticks the stand stands on the stone with its eggs gone (execute if block 0 100 0 minecraft:turtle_egg → Test failed), the other stack untouched (…[eggs=4] → Test passed).

Other projects' code

none

Self-check

The two failing tests are the Windows checkout's CRLF (#6372, fixed by #6375): they read breathing.rs and loot.rs, which this doesn't touch. Linux CI checks them out with LF.

pr_ready (tools/pr_ready.py --quick --base upstream/main on Evrim-PC, against upstream/main at eb0d9e580, 2 min 6 s)

Check Result
Scope ✅ 5 files, +219 −28
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 595 passed (1 min 8 s)
rustfmt ✅ (9 s)
clippy ✅ (11 s)
tests: horizon-client, horizon-client-lib ❌ 586 passed, 2 failed (31 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 ➖ 306 affected, to run in CI (--quick): armor_stand_turtle_egg, arrow, block_particles, breaking_model, chunk_generation, command_exec, command_parse, composter, consumable_emission, consumable, consume_effect, container_screen and 294 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/6631 **Author:** [@Ragbie](https://github.com/Ragbie) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/armor-stand-turtle-eggs` --- ### 📝 Commits (6) - [`5f1c085`](https://github.com/horizon-rust/horizon/commit/5f1c085f975c8cd416b6d9518fbbf3205a94b6c9) Armor stands crack the turtle eggs they stand or land on - [`fb2c9f5`](https://github.com/horizon-rust/horizon/commit/fb2c9f59d8e3958cc8082b7a0a3a7453120ca055) Armor stands: the egg under them is their supporting block's - [`fb7006f`](https://github.com/horizon-rust/horizon/commit/fb7006fd64d0c9b7c3de8f64224aaab62e06a426) Armor stand egg harness: the edge stand drops off the single egg - [`4d38650`](https://github.com/horizon-rust/horizon/commit/4d38650b48009ca31dce6a293431479d43112fa5) Armor stands: rustfmt - [`701d1a6`](https://github.com/horizon-rust/horizon/commit/701d1a6cd1fa8bf8b3d4676d622cc6633fa60286) Merge main into #6631 - [`3442798`](https://github.com/horizon-rust/horizon/commit/34427987a3cfa27994c1480d5bdba3d8f5b2b899) Merge main into #6631 ### 📊 Changes **5 files changed** (+219 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+36 -0) 📝 `crates/horizon-client/src/game.rs` (+1 -1) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+49 -4) 📝 `crates/horizon-client/src/game/creatures.rs` (+26 -23) ➕ `tools/test_armor_stand_turtle_egg_parity.py` (+107 -0) </details> ### 📄 Description > 🤖 Opened by Ragbie's AI agent (Claude Code, Opus 5.5), not by Ragbie personally. ## What and why An armor stand is a `LivingEntity`, so vanilla's `TurtleEggBlock` cracks the eggs it stands or lands on while mob griefing is on (`canDestroyEgg`): `stepOn` one tick in 100, `fallOn` one landing in 3. Horizon's armor stand tick ran neither, so a stand could stand on eggs forever (the armor stand point of #5858). - `game/armor_stands.rs`: after the stand's move, `fallOn`'s roll on a landing, then `stepOn`'s, each re-reading the block, on the level's random, only where the server runs (not on a remote client). The landing's location effects now run before them, as `LivingEntity.checkFallDamage` calls `onChangedBlock` before `fallOn`. - `entities.rs`: the stand keeps `Entity.setOnGroundWithMovement`'s supporting block (`GroundState` with `find_supporting_block`, as the player does), and `ArmorStand::on_pos_legacy` is `getOnPos(0.2)`: the supporting block's column, so a stand whose centre is past the egg's edge still stands on it. - `game/creatures.rs`: the mobs' egg crack (`decreaseEggs`) moves into `Game::crack_turtle_egg`, used by both. Part of #5858 (the anvil drop point stays open; placement particles and the player's trample are already on main). ## 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 `TurtleEggBlock.stepOn`, `fallOn`, `destroyEgg`, `canDestroyEgg`, `decreaseEggs`, `getShape`; `LivingEntity.aiStep` (`travel`, then `applyEffectsFromBlocks`); `Entity.applyEffectsFromBlocks(List)`, `move`, `checkFallDamage`, `checkSupportingBlock`, `getOnPos(float)`, `getOnPosLegacy`; `CollisionGetter.findSupportingBlock`; `ArmorStand.travel`, `hasPhysics` (read with `tools/rea_vanilla.py`). New harness `tools/test_armor_stand_turtle_egg_parity.py` (real vanilla and Horizon servers): stands on four eggs for 1500 ticks with mob griefing on (fewer than four cracks: about 2 in 10000), a small stand, a marker stand (never lands, eggs stay), an egg with no stand, a stand whose centre is past the egg's edge (three cracks, then the single egg's narrower shape drops it to the stone, so one egg stays), and a stand with mob griefing off. - Before the change: `-stand-check fail` / `+stand-check pass`, same for `small-stand`. - Before the supporting-block part: `-edge-stand-check pass` / `+edge-stand-check fail`. - After: `armor-stand turtle eggs: 6 results match vanilla`. In game (Windows 11, `horizon-ctl`, offscreen): a stand on four eggs next to a second stack of four; after 1500 ticks the stand stands on the stone with its eggs gone (`execute if block 0 100 0 minecraft:turtle_egg` → `Test failed`), the other stack untouched (`…[eggs=4]` → `Test passed`). ## Other projects' code none ## Self-check The two failing tests are the Windows checkout's CRLF (#6372, fixed by #6375): they read `breathing.rs` and `loot.rs`, which this doesn't touch. Linux CI checks them out with LF. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Evrim-PC, against upstream/main at eb0d9e580, 2 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +219 −28 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 595 passed (1 min 8 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (11 s) | | tests: horizon-client, horizon-client-lib | ❌ 586 passed, 2 failed (31 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 | ➖ 306 affected, to run in CI (--quick): armor_stand_turtle_egg, arrow, block_particles, breaking_model, chunk_generation, command_exec, command_parse, composter, consumable_emission, consumable, consume_effect, container_screen and 294 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:31:23 +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#6998
No description provided.