[PR #7087] [MERGED] Port ledger: game-007 rows the piglin riding code now answers #7326

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

📋 Pull Request Information

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

Base: main ← Head: chore/ledger-game-007-x


📝 Commits (1)

  • ae0705e Port ledger: game-007 rows the piglin riding code now answers

📊 Changes

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

View changed files

📝 tools/port_map/game-007.tsv (+3 -3)

📄 Description

Corrects three stale rows in tools/port_map/game-007.tsv, checked against upstream/main (26.3).

row was now
BackUpIfTooClose.create inline citing mobs/piglin.rs::BackUpIfTooClose — a struct, so map-check reported "no fn" inline crates/horizon-client/src/mobs/piglin.rs::too_close
DismountOrSkipMounting.create missing — "piglins never ride" port crates/horizon-client/src/mobs/piglin.rs::dismount_or_skip_mounting
DismountOrSkipMounting.isVehicleValid missing — "no piglin riding" inline crates/horizon-client/src/mobs/piglin.rs::dismount_or_skip_mounting

Citations:

  • piglin.rs:601 dismount_or_skip_mounting, whose doc names DismountOrSkipMounting.create(8, wantsToStopRiding): the vehicle it sits on, or else the ride target, stays only while it is alive, closer than 8 blocks (64.0, squared) and the piglin does not want off it; otherwise it gets off (dismount, through Animal.getDismountLocationForPassenger) and forgets the ride target, and a vehicle gone from the level counts as dead. It runs in the ride activity from brain_step (piglin.rs:325-328, right after mount), so piglins do ride now: mount at 537 and the baby-hoglin ride target at 503.
  • the isVehicleValid test is the alive && distance_sqr < 64.0 && !wants_to_stop_riding line inside that same fn; the ledger has isVehicleValid calling Entity.closerThan and Entity.isAlive and called only by DismountOrSkipMounting.create, which is what that line is. wants_to_stop_riding (590) is PiglinAi.wantsToStopRiding, the predicate create is given.
  • piglin.rs:1122 too_close: crossbow in the main hand, no walk under way, attack target in sight and closer than 5 blocks — the check BackUpIfTooClose.create(5, 0.75) builds, named in the struct's doc at 1115-1118. The 0.75 is the strafe in the goal's tick (1148-1159), registered at 1171.

map-check (build of upstream/main with the 26.3 client and server jars, 76807 methods):

$ PORT_LEDGER_OUT=/tmp/pledger-a1x python3 tools/port_ledger.py map-check tools/port_map/game-007.tsv
149 rows, no problems.

Proven: all three citations resolve to fns in this tree and each answers the vanilla method it is put against: the ride activity runs mount and then dismount_or_skip_mounting, which is DismountOrSkipMounting.create(8, wantsToStopRiding) with the isVehicleValid aliveness and 8-block test made in the same fn; too_close is the 5-block crossbow check BackUpIfTooClose.create(5, 0.75) builds. The rows left as missing were re-checked in this tree and are still absent: the LAN host still sends only PositionPath::Linear (lan/entity.rs:463) and nothing keeps a server-side tracker, so SteppedInterpolationTracker.addStep/updateTracking/getPositionPath stand; there is no assign_all_values/assign_base_values/assign_permanent_modifiers anywhere, so the three AttributeMap.assign* rows stand; animal_brain.rs's AnimalPanic arm has no water search, so AnimalPanic.lookForWater stands.

Not proven: vanilla's create returns a behaviour for the Ride activity's list, here the two calls are hand-written in brain_step, so the order against the activity's other behaviours matches by construction rather than by data. isVehicleValid is not a separate fn here, so its row is a citation to the fn that folded it in, not a name-for-name port. No test drives a piglin onto a hoglin or a crossbow piglin backing off: map-check is the only check run, and the ride activity's predicates are read, not executed.


🔄 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/7087 **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/ledger-game-007-x` --- ### 📝 Commits (1) - [`ae0705e`](https://github.com/horizon-rust/horizon/commit/ae0705eedd577f608ba8b9f9e138dbb3106f77cc) Port ledger: game-007 rows the piglin riding code now answers ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game-007.tsv` (+3 -3) </details> ### 📄 Description Corrects three stale rows in `tools/port_map/game-007.tsv`, checked against `upstream/main` (26.3). | row | was | now | | --- | --- | --- | | `BackUpIfTooClose.create` | `inline` citing `mobs/piglin.rs::BackUpIfTooClose` — a struct, so `map-check` reported "no fn" | `inline` `crates/horizon-client/src/mobs/piglin.rs::too_close` | | `DismountOrSkipMounting.create` | `missing` — "piglins never ride" | `port` `crates/horizon-client/src/mobs/piglin.rs::dismount_or_skip_mounting` | | `DismountOrSkipMounting.isVehicleValid` | `missing` — "no piglin riding" | `inline` `crates/horizon-client/src/mobs/piglin.rs::dismount_or_skip_mounting` | Citations: - `piglin.rs:601` `dismount_or_skip_mounting`, whose doc names `DismountOrSkipMounting.create(8, wantsToStopRiding)`: the vehicle it sits on, or else the ride target, stays only while it is alive, closer than 8 blocks (`64.0`, squared) and the piglin does not want off it; otherwise it gets off (`dismount`, through `Animal.getDismountLocationForPassenger`) and forgets the ride target, and a vehicle gone from the level counts as dead. It runs in the ride activity from `brain_step` (`piglin.rs:325-328`, right after `mount`), so piglins do ride now: `mount` at 537 and the baby-hoglin ride target at 503. - the `isVehicleValid` test is the `alive && distance_sqr < 64.0 && !wants_to_stop_riding` line inside that same fn; the ledger has `isVehicleValid` calling `Entity.closerThan` and `Entity.isAlive` and called only by `DismountOrSkipMounting.create`, which is what that line is. `wants_to_stop_riding` (590) is `PiglinAi.wantsToStopRiding`, the predicate `create` is given. - `piglin.rs:1122` `too_close`: crossbow in the main hand, no walk under way, attack target in sight and closer than 5 blocks — the check `BackUpIfTooClose.create(5, 0.75)` builds, named in the struct's doc at 1115-1118. The `0.75` is the strafe in the goal's `tick` (1148-1159), registered at 1171. map-check (build of `upstream/main` with the 26.3 client and server jars, 76807 methods): ``` $ PORT_LEDGER_OUT=/tmp/pledger-a1x python3 tools/port_ledger.py map-check tools/port_map/game-007.tsv 149 rows, no problems. ``` **Proven:** all three citations resolve to fns in this tree and each answers the vanilla method it is put against: the ride activity runs `mount` and then `dismount_or_skip_mounting`, which is `DismountOrSkipMounting.create(8, wantsToStopRiding)` with the `isVehicleValid` aliveness and 8-block test made in the same fn; `too_close` is the 5-block crossbow check `BackUpIfTooClose.create(5, 0.75)` builds. The rows left as `missing` were re-checked in this tree and are still absent: the LAN host still sends only `PositionPath::Linear` (`lan/entity.rs:463`) and nothing keeps a server-side tracker, so `SteppedInterpolationTracker.addStep`/`updateTracking`/`getPositionPath` stand; there is no `assign_all_values`/`assign_base_values`/`assign_permanent_modifiers` anywhere, so the three `AttributeMap.assign*` rows stand; `animal_brain.rs`'s `AnimalPanic` arm has no water search, so `AnimalPanic.lookForWater` stands. **Not proven:** vanilla's `create` returns a behaviour for the Ride activity's list, here the two calls are hand-written in `brain_step`, so the order against the activity's other behaviours matches by construction rather than by data. `isVehicleValid` is not a separate fn here, so its row is a citation to the fn that folded it in, not a name-for-name port. No test drives a piglin onto a hoglin or a crossbow piglin backing off: `map-check` is the only check run, and the ride activity's predicates are read, not executed. --- <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:43 +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#7326
No description provided.