[PR #7077] [MERGED] Boats stop at the world border #7317

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

📋 Pull Request Information

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

Base: main ← Head: fix/7065-boat-world-border


📝 Commits (3)

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/boats.rs (+3 -2)

📄 Description

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

Fixes #7065

What was wrong

Entity.move reaches CollisionGetter.getCollisions for every entity, and getBlockCollisions adds borderCollision(entity, box), so the world border stops a boat as it does the player (Entity.collectColliders skips it only for the callers that say IgnoringWorldBorder; read with javap on the 26.3 server jar). Game::tick_boat built its EntityCollisions with border: None, so a boat, and the player in it, sailed straight through the border. The player's own movement already passes the border (motion.rs, filled from player_border).

What changed

game/boats.rs: tick_boat passes self.border.geometry() and the boat's x and z to EntityCollisions, as the player and the pistons do. One line of code and its comment.

Minecarts have the same border: None in move_cart (game/minecarts.rs); it is left to its own change (#7067), as several open pull requests touch that file.

How it was checked

In the game (horizon-ctl launch --offscreen, creative world), a border 4 blocks wide, an oak boat on a strip of water launched toward it with Motion:[3.0,0.0,0.0], its Pos read with /data get entity after 6 s:

Build Boat x
origin/main 14.31 (through the border, to the end of the strip)
this branch 2.31 (stopped at the border)

No unit test: tick_boat needs a Game, which has no test fixture, and the border itself is already covered by a_body_next_to_the_border_stops_at_its_wall in collisions.rs.

Self-check

tools/pr_ready.py --quick --base origin/main:

Check Result
Scope 1 file, +3 −2
Cargo.lock unchanged
rustfmt, clippy ✅
tests: horizon-client ✅ 661 passed
mod API up to date ✅
Python tests 4 errors from my machine's setup (a global tests package, no launcher build), untouched here
Parity not run (--quick): the CI parity job picks the affected harnesses

Label: a fix, no feature label.


🔄 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/7077 **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/7065-boat-world-border` --- ### 📝 Commits (3) - [`42b7f3c`](https://github.com/horizon-rust/horizon/commit/42b7f3cebd478ecc87e54c3f72ad63dd9e651ef2) Boats stop at the world border - [`ee15958`](https://github.com/horizon-rust/horizon/commit/ee159589bcb7b423c8a026f3ca541710ae95f5b9) Merge origin/main - [`2e2d9f2`](https://github.com/horizon-rust/horizon/commit/2e2d9f25b74cf601cb4b4dcc5ca76d3703e11587) Merge origin/main ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boats.rs` (+3 -2) </details> ### 📄 Description > 🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review. Fixes #7065 ## What was wrong `Entity.move` reaches `CollisionGetter.getCollisions` for every entity, and `getBlockCollisions` adds `borderCollision(entity, box)`, so the world border stops a boat as it does the player (`Entity.collectColliders` skips it only for the callers that say `IgnoringWorldBorder`; read with `javap` on the 26.3 server jar). `Game::tick_boat` built its `EntityCollisions` with `border: None`, so a boat, and the player in it, sailed straight through the border. The player's own movement already passes the border (`motion.rs`, filled from `player_border`). ## What changed `game/boats.rs`: `tick_boat` passes `self.border.geometry()` and the boat's x and z to `EntityCollisions`, as the player and the pistons do. One line of code and its comment. Minecarts have the same `border: None` in `move_cart` (`game/minecarts.rs`); it is left to its own change (#7067), as several open pull requests touch that file. ## How it was checked In the game (`horizon-ctl launch --offscreen`, creative world), a border 4 blocks wide, an oak boat on a strip of water launched toward it with `Motion:[3.0,0.0,0.0]`, its `Pos` read with `/data get entity` after 6 s: | Build | Boat x | | --- | --- | | `origin/main` | 14.31 (through the border, to the end of the strip) | | this branch | 2.31 (stopped at the border) | No unit test: `tick_boat` needs a `Game`, which has no test fixture, and the border itself is already covered by `a_body_next_to_the_border_stops_at_its_wall` in `collisions.rs`. ## Self-check `tools/pr_ready.py --quick --base origin/main`: | Check | Result | | --- | --- | | Scope | 1 file, +3 −2 | | Cargo.lock | unchanged | | rustfmt, clippy | ✅ | | tests: horizon-client | ✅ 661 passed | | mod API up to date | ✅ | | Python tests | 4 errors from my machine's setup (a global `tests` package, no launcher build), untouched here | | Parity | not run (`--quick`): the CI parity job picks the affected harnesses | Label: a fix, no `feature` label. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:39 +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#7317
No description provided.