[PR #7580] [MERGED] port_map: the wall hanging sign rows name the function that holds the port #7687

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

📋 Pull Request Information

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

Base: main ← Head: port-map/wall-hanging-sign-chain


📝 Commits (1)

  • b3475f8 port_map: the wall hanging sign rows name the function that holds the port

📊 Changes

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

View changed files

📝 tools/port_map/classes-04.tsv (+3 -3)

📄 Description

Vanilla

WallHangingSignBlock.useItemOn passes the click through to the item only when
shouldTryToChainAnotherHangingSign says so, and that method has three conditions:

  0-12: sign.canExecuteClickCommands(sign.getSlotPlayerIsFacing(player), player)   // must be false
  15-23: stack.getItem() instanceof HangingSignItem                                // must be true
  26-32: !this.isHittingEditableSide(hit, state)                                   // must be true

isHittingEditableSide is hit.getDirection().getAxis() == state.getValue(FACING).getAxis() (a wall hanging
sign's FACING is horizontal, so the editable sides are the face it faces and its opposite). Passing lets the
held HangingSignItem place its own block, which chains onto the wall sign; not passing falls through to
SignBlock.useItemOn, which applies an ink sac or opens the sign editor.

Horizon

The behaviour itself is ported: Sim::block_use_item_on has the HangingSignItem and editable-side tests and
returns PASS on a non-editable face. The tools/port_map rows for it were wrong rather than the code:

  • WallHangingSignBlock.isHittingEditableSide and shouldTryToChainAnotherHangingSign pointed at
    crates/horizon-world/src/level/interact.rs::Behaviours::block_use_item_on, a function that does not exist
    — the arm is in Sim::block_use_item_on in that file, so the ledger can only report those rows as map
    gaps and tells a reader nothing.
  • Their notes said the chain is not ported at all, and WallHangingSignBlock.useItemOn said the same, which
    is false: the pass is there. The one condition Horizon cannot read is
    canExecuteClickCommands — the world has no sign text — so a waxed wall hanging sign whose faced side
    runs a click command chains a new sign where vanilla opens its editor. Game::sign_can_execute_click_commands
    answers it on the client, which is where the ceiling hanging sign's equivalent check already lives.

This fixes the three rows: the right function, and the remaining difference stated as it is. It also removes a
wrong port claim (the useItemOn row) rather than leaving it behind.

Proven:

  • The two rows named a function that does not exist: grep -c "Behaviours::block_use_item_on" over
    tools/port_map/*.tsv is 3 before this change and 0 after, and
    grep -n "fn block_use_item_on" crates/horizon-world/src/level/interact.rs finds one function, inside
    impl<L: LevelAccess + ?Sized> Sim<'_, L> (interact.rs), so Sim::block_use_item_on is the resolvable name.
  • The three vanilla conditions are the bytecode quoted above, from
    javap -p -c -constants -cp /tmp/cj net.minecraft.world.level.block.WallHangingSignBlock
    (shouldTryToChainAnotherHangingSign, isHittingEditableSide); each row now states which of them the port
    has and which it cannot read.

Not proven:

  • No behaviour changed, so there is nothing to run: this is the map, not the port. Note that
    python3 tools/port_ledger.py build crashes on this tree before it reaches these rows —
    FileNotFoundError: crates/horizon-client-render/src/gfx/animate.rs, a verdict row naming a file that is
    not in the tree — so the map gap these rows caused could not be shown disappearing; the grep above stands
    in for it. That crash is worth a look on its own.
  • The click-command condition itself is still unported. Fixing it means either a LevelAccess hook that the
    client answers from its sign block entity, or moving the wall hanging sign's pass into the client's
    use_hand next to the ceiling hanging sign's chains_sign check; both are larger than a map correction and
    neither has a test that can run here (the client harness needs the prepared resources).

🔄 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/7580 **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:** `port-map/wall-hanging-sign-chain` --- ### 📝 Commits (1) - [`b3475f8`](https://github.com/horizon-rust/horizon/commit/b3475f8769ac8fc899e8bd5ae019c85304174e00) port_map: the wall hanging sign rows name the function that holds the port ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/classes-04.tsv` (+3 -3) </details> ### 📄 Description ## Vanilla `WallHangingSignBlock.useItemOn` passes the click through to the item only when `shouldTryToChainAnotherHangingSign` says so, and that method has three conditions: ``` 0-12: sign.canExecuteClickCommands(sign.getSlotPlayerIsFacing(player), player) // must be false 15-23: stack.getItem() instanceof HangingSignItem // must be true 26-32: !this.isHittingEditableSide(hit, state) // must be true ``` `isHittingEditableSide` is `hit.getDirection().getAxis() == state.getValue(FACING).getAxis()` (a wall hanging sign's `FACING` is horizontal, so the editable sides are the face it faces and its opposite). Passing lets the held `HangingSignItem` place its own block, which chains onto the wall sign; not passing falls through to `SignBlock.useItemOn`, which applies an ink sac or opens the sign editor. ## Horizon The behaviour itself is ported: `Sim::block_use_item_on` has the `HangingSignItem` and editable-side tests and returns `PASS` on a non-editable face. The `tools/port_map` rows for it were wrong rather than the code: - `WallHangingSignBlock.isHittingEditableSide` and `shouldTryToChainAnotherHangingSign` pointed at `crates/horizon-world/src/level/interact.rs::Behaviours::block_use_item_on`, a function that does not exist — the arm is in `Sim::block_use_item_on` in that file, so the ledger can only report those rows as `map` gaps and tells a reader nothing. - Their notes said the chain is not ported at all, and `WallHangingSignBlock.useItemOn` said the same, which is false: the pass is there. The one condition Horizon cannot read is `canExecuteClickCommands` — the world has no sign text — so a waxed wall hanging sign whose faced side runs a click command chains a new sign where vanilla opens its editor. `Game::sign_can_execute_click_commands` answers it on the client, which is where the ceiling hanging sign's equivalent check already lives. This fixes the three rows: the right function, and the remaining difference stated as it is. It also removes a wrong `port` claim (the `useItemOn` row) rather than leaving it behind. ## **Proven:** - The two rows named a function that does not exist: `grep -c "Behaviours::block_use_item_on"` over `tools/port_map/*.tsv` is 3 before this change and 0 after, and `grep -n "fn block_use_item_on" crates/horizon-world/src/level/interact.rs` finds one function, inside `impl<L: LevelAccess + ?Sized> Sim<'_, L>` (interact.rs), so `Sim::block_use_item_on` is the resolvable name. - The three vanilla conditions are the bytecode quoted above, from `javap -p -c -constants -cp /tmp/cj net.minecraft.world.level.block.WallHangingSignBlock` (`shouldTryToChainAnotherHangingSign`, `isHittingEditableSide`); each row now states which of them the port has and which it cannot read. ## **Not proven:** - No behaviour changed, so there is nothing to run: this is the map, not the port. Note that `python3 tools/port_ledger.py build` crashes on this tree before it reaches these rows — `FileNotFoundError: crates/horizon-client-render/src/gfx/animate.rs`, a verdict row naming a file that is not in the tree — so the `map` gap these rows caused could not be shown disappearing; the grep above stands in for it. That crash is worth a look on its own. - The click-command condition itself is still unported. Fixing it means either a `LevelAccess` hook that the client answers from its sign block entity, or moving the wall hanging sign's pass into the client's `use_hand` next to the ceiling hanging sign's `chains_sign` check; both are larger than a map correction and neither has a test that can run here (the client harness needs the prepared resources). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:22:01 +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#7687
No description provided.