[PR #7359] [MERGED] Port map: clipIncludingBorder is clip_including_border #7548

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

📋 Pull Request Information

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

Base: main ← Head: chore/stale1-game2-010


📝 Commits (1)

  • 665ff98 Port map: clipIncludingBorder is clip_including_border

📊 Changes

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

View changed files

📝 tools/port_map/game2-010.tsv (+1 -1)

📄 Description

Row 121 of tools/port_map/game2-010.tsv had missing in the verdict cell for CollisionGetter.clipIncludingBorder, with a note saying no world-border clamp of a ray could be found in clip_ray. The clamp is not inside clip_ray: projectiles.rs wraps the block clip in clip_including_border, and creatures.rs passes every projectile clip through it.

row before now cites
121 CollisionGetter.clipIncludingBorder missing — "unsure: no world-border clamp of a ray found in clip_ray" crates/horizon-client/src/projectiles.rs::clip_including_border — a ray that starts inside the world border and ends outside it stops on the border at WorldBorder.clampVec3ToBound of that point, facing the nearest direction of travel; the projectile clip in creatures.rs calls it around its block clip

Validation, against a build of upstream/main (62d8b5828) with both 26.3 jars in /tmp/led-stale1:

$ PORT_LEDGER_OUT=/tmp/led-stale1 python3 tools/port_ledger.py map-check tools/port_map/game2-010.tsv
140 rows, no problems.

Proven: the vanilla method (CollisionGetter.java:115) clips, then, when the border holds from and not the hit location, takes Direction.getApproximateNearest of the travel and WorldBorder.clampVec3ToBound of the hit. clip_including_border does the same with the border's [minX, minZ, maxX, maxZ], including vanilla's 1.0E-5 inset from the far edges, and creatures.rs's ProjectileWorld clip calls it whenever the world has a border, so the behaviour is wired and not just present.

Not proven: that the border clamp matches vanilla for a ray whose end is inside the border but whose block hit is outside — the early return for within(end) follows the decompiled code, but no parity test covers the border case; projectiles.rs's own tests cover the miss, the hit inside and the hit outside only.


🔄 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/7359 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/stale1-game2-010` --- ### 📝 Commits (1) - [`665ff98`](https://github.com/horizon-rust/horizon/commit/665ff9893ff3aa6ae163161b49005d5877eb7b86) Port map: clipIncludingBorder is clip_including_border ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-010.tsv` (+1 -1) </details> ### 📄 Description Row 121 of `tools/port_map/game2-010.tsv` had `missing` in the verdict cell for `CollisionGetter.clipIncludingBorder`, with a note saying no world-border clamp of a ray could be found in `clip_ray`. The clamp is not inside `clip_ray`: `projectiles.rs` wraps the block clip in `clip_including_border`, and `creatures.rs` passes every projectile clip through it. | row | before | now cites | | --- | --- | --- | | 121 `CollisionGetter.clipIncludingBorder` | `missing` — "unsure: no world-border clamp of a ray found in clip_ray" | `crates/horizon-client/src/projectiles.rs::clip_including_border` — a ray that starts inside the world border and ends outside it stops on the border at `WorldBorder.clampVec3ToBound` of that point, facing the nearest direction of travel; the projectile clip in `creatures.rs` calls it around its block clip | Validation, against a build of `upstream/main` (62d8b5828) with both 26.3 jars in `/tmp/led-stale1`: ``` $ PORT_LEDGER_OUT=/tmp/led-stale1 python3 tools/port_ledger.py map-check tools/port_map/game2-010.tsv 140 rows, no problems. ``` **Proven:** the vanilla method (`CollisionGetter.java:115`) clips, then, when the border holds `from` and not the hit location, takes `Direction.getApproximateNearest` of the travel and `WorldBorder.clampVec3ToBound` of the hit. `clip_including_border` does the same with the border's `[minX, minZ, maxX, maxZ]`, including vanilla's 1.0E-5 inset from the far edges, and `creatures.rs`'s `ProjectileWorld` clip calls it whenever the world has a border, so the behaviour is wired and not just present. **Not proven:** that the border clamp matches vanilla for a ray whose end is inside the border but whose block hit is outside — the early return for `within(end)` follows the decompiled code, but no parity test covers the border case; `projectiles.rs`'s own tests cover the miss, the hit inside and the hit outside only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:33 +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#7548
No description provided.