[PR #6970] [MERGED] Clear stale classes-01.tsv rows main already implements #7240

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

📋 Pull Request Information

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

Base: main ← Head: chore/ledger-classes-01-rows


📝 Commits (3)

  • a7a4fd4 Clear stale classes-01 ledger rows the tree already implements
  • 41d5f70 Merge remote-tracking branch 'upstream/main' into HEAD
  • 24df418 Merge main into #6970

📊 Changes

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

View changed files

📝 tools/port_map/classes-01.tsv (+18 -18)

📄 Description

Eighteen rows of tools/port_map/classes-01.tsv were stale: thirteen whose behaviour is in the tree (and wired) still said missing, four cited a function that no longer resolves, and one class row was written as if it were a method row. Each was checked against the tree, and the jar's bytecode where the rule matters.

Rows and their citations:

  • StopAdmiringIfItemTooFarAway.create → crates/horizon-client/src/mobs/piglin.rs::Memories::admire_seen (inline, the 9 block test on NEAREST_VISIBLE_WANTED_ITEM while the off hand holds what is admired)
  • StopAdmiringIfTiredOfTryingToReachItem.create → crates/horizon-client/src/mobs/piglin.rs::Memories::admire_seen (inline, the 200 tick TIME_TRYING_TO_REACH_ADMIRE_ITEM countdown that ends the admire)
  • AbstractThrownPotion.calculateHorizontalHurtKnockbackDirection → crates/horizon-client/src/mobs.rs::Mob::damage_with (inline; the splash's hurt is Damage::indirect_magic from the potion position, and the hurt pushes away from that position, as the override does)
  • ThrowableItemProjectile.readAdditionalSaveData → crates/horizon-client/src/entity_nbt.rs::throwable_from_nbt (port, the Item it flies as read back with the rest)
  • DoubleHighBlockItem.placeBlock → crates/horizon-world/src/level/place.rs::Sim::place (port, the block above cleared to air, or left as water, before the placed half)
  • DyeItem.interactLivingEntity → crates/horizon-client/src/game/creatures.rs::Game::interact_mob (port, an unsheared sheep's wool and a tamed wolf's or cat's collar)
  • FireChargeItem.useOn → crates/horizon-client/src/game.rs::Game::use_tool (inline, lights a campfire or candle, else sets fire above the click, one charge used)
  • HangingSignItem.canPlace → crates/horizon-world/src/level/place.rs::Sim::placement (inline; a wall hanging sign also needs wall_hanging_sign_can_place, and either kind must survive where it goes)
  • InstrumentItem.play → crates/horizon-client/src/game.rs::Game::use_instrument (inline, the sound at the player, INSTRUMENT_PLAY and the cooldown)
  • InstrumentItem.use → crates/horizon-client/src/game.rs::Game::use_instrument (port)
  • KnowledgeBookItem.use → crates/horizon-client/src/game/advancements.rs::Game::use_knowledge_book (port)
  • NameTagItem.interactLivingEntity → crates/horizon-client/src/game/names.rs::Game::name_mob (port, names the mob under the crosshair, persistent, the tag used up)
  • AdventureModePredicate → home crates/horizon-client/src/game.rs: the class row was written as port with a file::fn citation, which map-check rejects for a row without a method; the lists themselves are can_place_on_in_adventure.
  • MinecartCommandBlock.defineSynchedData → crates/horizon-client/src/game/minecarts.rs::Minecart::new (port), MinecartCommandBlock.onSyncedDataUpdated and MinecartCommandBlock.MinecartCommandBase.onUpdated → crates/horizon-client/src/game/command_minecarts.rs::Game::cart_command_updated (inline), MinecartCommandBlock.MinecartCommandBase.createCommandSourceStack → crates/horizon-client/src/game/command_minecarts.rs::Game::perform_cart_command (port): these four cited a field (command_due) and a bare line number, which no longer resolve.
  • Fireball.readAdditionalSaveData → missing, its unsure verdict resolved: fireball_from_nbt reads no Item key, so a saved fireball is drawn as the default fire charge.

Still missing after checking, left alone: Mannequin.applyImplicitComponent (no mannequin item exists to carry a profile), PiglinBruteAi.initMemories (a brute remembers no home), PiglinBruteAi.isNearestValidAttackTarget, PiglinBruteAi.setAngerTarget (nothing writes ANGRY_AT), PlayerSkin.with (the profile patch is applied to skull textures only, never to a player skin), Fireball.getSlot and Fireball.setItem (a projectile keeps no displayed item and exposes no slot).

Checked on the build VM, this file only:

python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar >/dev/null && python3 tools/port_ledger.py map-check tools/port_map/classes-01.tsv
224 rows, no problems.

Proven: every citation resolves in the ledger and the whole file passes map-check; the paste-through sites are real (game/persist.rs reads throwable_from_nbt, place runs on a block placement, interact_mob runs on an entity click, use_knowledge_book on the book's use).

Not proven: none of it was watched in a running game. The eight rows left missing rest on reading the tree, not on play.


🔄 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/6970 **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-classes-01-rows` --- ### 📝 Commits (3) - [`a7a4fd4`](https://github.com/horizon-rust/horizon/commit/a7a4fd412a40a0745317437a5e5b6f47dee3aa5d) Clear stale classes-01 ledger rows the tree already implements - [`41d5f70`](https://github.com/horizon-rust/horizon/commit/41d5f70d5ff1472f0cb15fc590d3edb1bca32548) Merge remote-tracking branch 'upstream/main' into HEAD - [`24df418`](https://github.com/horizon-rust/horizon/commit/24df4186a94ac79f3d3ae978dcb7845c2215433b) Merge main into #6970 ### 📊 Changes **1 file changed** (+18 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/classes-01.tsv` (+18 -18) </details> ### 📄 Description Eighteen rows of `tools/port_map/classes-01.tsv` were stale: thirteen whose behaviour is in the tree (and wired) still said `missing`, four cited a function that no longer resolves, and one class row was written as if it were a method row. Each was checked against the tree, and the jar's bytecode where the rule matters. Rows and their citations: - `StopAdmiringIfItemTooFarAway.create` → `crates/horizon-client/src/mobs/piglin.rs::Memories::admire_seen` (`inline`, the 9 block test on `NEAREST_VISIBLE_WANTED_ITEM` while the off hand holds what is admired) - `StopAdmiringIfTiredOfTryingToReachItem.create` → `crates/horizon-client/src/mobs/piglin.rs::Memories::admire_seen` (`inline`, the 200 tick `TIME_TRYING_TO_REACH_ADMIRE_ITEM` countdown that ends the admire) - `AbstractThrownPotion.calculateHorizontalHurtKnockbackDirection` → `crates/horizon-client/src/mobs.rs::Mob::damage_with` (`inline`; the splash's hurt is `Damage::indirect_magic` from the potion position, and the hurt pushes away from that position, as the override does) - `ThrowableItemProjectile.readAdditionalSaveData` → `crates/horizon-client/src/entity_nbt.rs::throwable_from_nbt` (`port`, the `Item` it flies as read back with the rest) - `DoubleHighBlockItem.placeBlock` → `crates/horizon-world/src/level/place.rs::Sim::place` (`port`, the block above cleared to air, or left as water, before the placed half) - `DyeItem.interactLivingEntity` → `crates/horizon-client/src/game/creatures.rs::Game::interact_mob` (`port`, an unsheared sheep's wool and a tamed wolf's or cat's collar) - `FireChargeItem.useOn` → `crates/horizon-client/src/game.rs::Game::use_tool` (`inline`, lights a campfire or candle, else sets fire above the click, one charge used) - `HangingSignItem.canPlace` → `crates/horizon-world/src/level/place.rs::Sim::placement` (`inline`; a wall hanging sign also needs `wall_hanging_sign_can_place`, and either kind must survive where it goes) - `InstrumentItem.play` → `crates/horizon-client/src/game.rs::Game::use_instrument` (`inline`, the sound at the player, `INSTRUMENT_PLAY` and the cooldown) - `InstrumentItem.use` → `crates/horizon-client/src/game.rs::Game::use_instrument` (`port`) - `KnowledgeBookItem.use` → `crates/horizon-client/src/game/advancements.rs::Game::use_knowledge_book` (`port`) - `NameTagItem.interactLivingEntity` → `crates/horizon-client/src/game/names.rs::Game::name_mob` (`port`, names the mob under the crosshair, persistent, the tag used up) - `AdventureModePredicate` → `home` `crates/horizon-client/src/game.rs`: the class row was written as `port` with a `file::fn` citation, which `map-check` rejects for a row without a method; the lists themselves are `can_place_on_in_adventure`. - `MinecartCommandBlock.defineSynchedData` → `crates/horizon-client/src/game/minecarts.rs::Minecart::new` (`port`), `MinecartCommandBlock.onSyncedDataUpdated` and `MinecartCommandBlock.MinecartCommandBase.onUpdated` → `crates/horizon-client/src/game/command_minecarts.rs::Game::cart_command_updated` (`inline`), `MinecartCommandBlock.MinecartCommandBase.createCommandSourceStack` → `crates/horizon-client/src/game/command_minecarts.rs::Game::perform_cart_command` (`port`): these four cited a field (`command_due`) and a bare line number, which no longer resolve. - `Fireball.readAdditionalSaveData` → `missing`, its `unsure` verdict resolved: `fireball_from_nbt` reads no `Item` key, so a saved fireball is drawn as the default fire charge. Still missing after checking, left alone: `Mannequin.applyImplicitComponent` (no mannequin item exists to carry a profile), `PiglinBruteAi.initMemories` (a brute remembers no home), `PiglinBruteAi.isNearestValidAttackTarget`, `PiglinBruteAi.setAngerTarget` (nothing writes `ANGRY_AT`), `PlayerSkin.with` (the profile patch is applied to skull textures only, never to a player skin), `Fireball.getSlot` and `Fireball.setItem` (a projectile keeps no displayed item and exposes no slot). Checked on the build VM, this file only: ``` python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar >/dev/null && python3 tools/port_ledger.py map-check tools/port_map/classes-01.tsv 224 rows, no problems. ``` **Proven:** every citation resolves in the ledger and the whole file passes `map-check`; the paste-through sites are real (`game/persist.rs` reads `throwable_from_nbt`, `place` runs on a block placement, `interact_mob` runs on an entity click, `use_knowledge_book` on the book's use). **Not proven:** none of it was watched in a running game. The eight rows left `missing` rest on reading the tree, not on play. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:36:13 +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#7240
No description provided.