[PR #7362] [MERGED] Port map: a locked container's notification is locked_message #7550

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

📋 Pull Request Information

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

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


📝 Commits (1)

  • 838bf53 Port map: a locked container's message is locked_message

📊 Changes

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

View changed files

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

📄 Description

Row 129 of tools/port_map/game2-016.tsv had missing in the verdict cell for BaseContainerBlockEntity.sendChestLockedNotifications, with a note saying Horizon has no Lock check and that chest_menu_blocked only looks at the block above. Both halves of that are answered: the lock is read and tested, and the text the method sends is built by containers.rs's locked_message.

row before now cites
129 BaseContainerBlockEntity.sendChestLockedNotifications missing — "Horizon has no Lock check; chest_menu_blocked (game/storage.rs) only looks at the block above" crates/horizon-client-render/src/containers.rs::locked_message — the container.isLocked action-bar text, naming the container by its display name; the menu path in game/lan_actions.rs refuses a container whose Lock the held item does not open, sends this and plays block.chest.locked

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-016.tsv
150 rows, no problems.

Proven: the vanilla method (BaseContainerBlockEntity.java:74) sends Component.translatable("container.isLocked", displayName) as an overlay message and, on the server, plays SoundEvents.CHEST_LOCKED. locked_message builds exactly that tag with container.isLocked and the display name as its only argument, and its one caller is Game::lan_open_container, the create-menu path: it tests each half of a double chest with container_locked_for (which reads the lock tag through World::block_lock and asks can_unlock, spectator or the held item), and on a lock sends locked_message with overlay: true and plays minecraft:block.chest.locked at the chest, then opens no menu.

Not proven: that every refusal path goes through that one caller — the dedicated-server and split-screen menu openings were not traced here, so the row claims the port, not that no other path skips the notification; and no parity test covers a locked container.


🔄 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/7362 **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-016` --- ### 📝 Commits (1) - [`838bf53`](https://github.com/horizon-rust/horizon/commit/838bf539a7ded3d07717327e617206ea30663cd6) Port map: a locked container's message is locked_message ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-016.tsv` (+1 -1) </details> ### 📄 Description Row 129 of `tools/port_map/game2-016.tsv` had `missing` in the verdict cell for `BaseContainerBlockEntity.sendChestLockedNotifications`, with a note saying Horizon has no `Lock` check and that `chest_menu_blocked` only looks at the block above. Both halves of that are answered: the lock is read and tested, and the text the method sends is built by `containers.rs`'s `locked_message`. | row | before | now cites | | --- | --- | --- | | 129 `BaseContainerBlockEntity.sendChestLockedNotifications` | `missing` — "Horizon has no Lock check; chest_menu_blocked (game/storage.rs) only looks at the block above" | `crates/horizon-client-render/src/containers.rs::locked_message` — the `container.isLocked` action-bar text, naming the container by its display name; the menu path in `game/lan_actions.rs` refuses a container whose `Lock` the held item does not open, sends this and plays `block.chest.locked` | 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-016.tsv 150 rows, no problems. ``` **Proven:** the vanilla method (`BaseContainerBlockEntity.java:74`) sends `Component.translatable("container.isLocked", displayName)` as an overlay message and, on the server, plays `SoundEvents.CHEST_LOCKED`. `locked_message` builds exactly that tag with `container.isLocked` and the display name as its only argument, and its one caller is `Game::lan_open_container`, the create-menu path: it tests each half of a double chest with `container_locked_for` (which reads the `lock` tag through `World::block_lock` and asks `can_unlock`, spectator or the held item), and on a lock sends `locked_message` with `overlay: true` and plays `minecraft:block.chest.locked` at the chest, then opens no menu. **Not proven:** that every refusal path goes through that one caller — the dedicated-server and split-screen menu openings were not traced here, so the row claims the port, not that no other path skips the notification; and no parity test covers a locked container. --- <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:34 +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#7550
No description provided.