[PR #7259] [MERGED] Armor stands stop at the world border #7447

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

📋 Pull Request Information

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

Base: main ← Head: fix/7080-armor-stand-world-border


📝 Commits (3)

  • df01dde Armor stands stop at the world border
  • d5a097e Test that the world border stops an armor stand
  • c769fc3 Merge remote-tracking branch 'origin/main' into fix/7080-armor-stand-world-border

📊 Changes

3 files changed (+83 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+62 -2)
📝 crates/horizon-client/src/entities/fluids.rs (+4 -4)
📝 crates/horizon-client/src/game/armor_stands.rs (+17 -11)

📄 Description

🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review.

Refs #7080

This is the last piece of #7080: mobs and endermen (#7108) and items, experience orbs, primed TNT and falling blocks (#7158) are merged, boats (#7077) too. With this one, every entity that moves through Entity.move's colliders stops at the world border; the issue can be closed once it lands.

What was wrong

Entity.collide builds its colliders with Entity.collectColliders, which adds WorldBorder.getCollisionShape for any entity inside and close to the border (read with javap on the 26.3 server jar). ArmorStand::tick resolved its move with SceneCollisions::resolve, the blocks alone, so a pushed or falling armor stand went through the border.

What changed

  1. Armor stands stop at the world border. ArmorStand::tick takes the level's border (Option<&BorderGeometry>), filled by tick_armor_stands from self.border.geometry(), None in tests, and resolves through SceneCollisions::resolve_in_border (the helper #7108 added), on a copy of the caller's scene so its collision context (leather boots on powder snow) is kept.
  2. A test: entities::armor_stand_motion_tests::the_world_border_stops_an_armor_stand, a stand moving 1.5 east from x = 24 toward a border wall at x = 25 (a border of size 10 around (20, 20)): past it without a border, its box ending on the wall with one.

How it was checked

In the game (horizon-ctl launch --offscreen, creative world, a stone floor at y = 100): /worldborder center 0 0 and /worldborder set 10 (walls from x = -4.5 to 5.5, the collision shape rounded out to x = 6 by getCollisionShape's Math.ceil), then /summon armor_stand 3 101 -3 {Motion:[1.5,0.2,0.0]}; its Pos from /data get entity after 4 s:

Build Armor stand x
origin/main (c5c8a33a8) 12.57 (through the border)
this branch 5.75 (its box ends on the wall at 6)

Self-check

tools/pr_ready.py --quick --base origin/main (after merging main):

Check Result
Scope 3 files, +83 −17
Cargo.lock unchanged
rustfmt, clippy ✅
tests: horizon-client, horizon-client-lib ✅ 2132 passed
mod API up to date ✅
Python tests 1 error from my machine's setup, untouched here
Parity not run (--quick): the CI parity job picks the affected harnesses

🤖 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/7259 **Author:** [@Akirabane](https://github.com/Akirabane) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/7080-armor-stand-world-border` --- ### 📝 Commits (3) - [`df01dde`](https://github.com/horizon-rust/horizon/commit/df01ddedb6ebc08c678ff17a9f844244d54cada6) Armor stands stop at the world border - [`d5a097e`](https://github.com/horizon-rust/horizon/commit/d5a097e0f093affd84b627e9cf2cc21e7f08a452) Test that the world border stops an armor stand - [`c769fc3`](https://github.com/horizon-rust/horizon/commit/c769fc342c02e24cae92adbe3f641b727a31f0dd) Merge remote-tracking branch 'origin/main' into fix/7080-armor-stand-world-border ### 📊 Changes **3 files changed** (+83 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+62 -2) 📝 `crates/horizon-client/src/entities/fluids.rs` (+4 -4) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+17 -11) </details> ### 📄 Description > 🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review. Refs #7080 This is the last piece of #7080: mobs and endermen (#7108) and items, experience orbs, primed TNT and falling blocks (#7158) are merged, boats (#7077) too. With this one, every entity that moves through `Entity.move`'s colliders stops at the world border; the issue can be closed once it lands. ## What was wrong `Entity.collide` builds its colliders with `Entity.collectColliders`, which adds `WorldBorder.getCollisionShape` for any entity inside and close to the border (read with `javap` on the 26.3 server jar). `ArmorStand::tick` resolved its move with `SceneCollisions::resolve`, the blocks alone, so a pushed or falling armor stand went through the border. ## What changed 1. **Armor stands stop at the world border.** `ArmorStand::tick` takes the level's border (`Option<&BorderGeometry>`), filled by `tick_armor_stands` from `self.border.geometry()`, `None` in tests, and resolves through `SceneCollisions::resolve_in_border` (the helper #7108 added), on a copy of the caller's scene so its collision context (leather boots on powder snow) is kept. 2. **A test**: `entities::armor_stand_motion_tests::the_world_border_stops_an_armor_stand`, a stand moving 1.5 east from x = 24 toward a border wall at x = 25 (a border of size 10 around (20, 20)): past it without a border, its box ending on the wall with one. ## How it was checked In the game (`horizon-ctl launch --offscreen`, creative world, a stone floor at y = 100): `/worldborder center 0 0` and `/worldborder set 10` (walls from x = -4.5 to 5.5, the collision shape rounded out to x = 6 by `getCollisionShape`'s `Math.ceil`), then `/summon armor_stand 3 101 -3 {Motion:[1.5,0.2,0.0]}`; its `Pos` from `/data get entity` after 4 s: | Build | Armor stand x | | --- | --- | | `origin/main` (c5c8a33a8) | 12.57 (through the border) | | this branch | 5.75 (its box ends on the wall at 6) | ## Self-check `tools/pr_ready.py --quick --base origin/main` (after merging main): | Check | Result | | --- | --- | | Scope | 3 files, +83 −17 | | Cargo.lock | unchanged | | rustfmt, clippy | ✅ | | tests: horizon-client, horizon-client-lib | ✅ 2132 passed | | mod API up to date | ✅ | | Python tests | 1 error from my machine's setup, untouched here | | Parity | not run (`--quick`): the CI parity job picks the affected harnesses | 🤖 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:39:42 +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#7447
No description provided.