[GH-ISSUE #5056] Native mods: follow-ups from the reviews of the block entity and screen hooks #1540

Closed
opened 2026-11-02 15:47:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Sylviromi on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5056

Originally assigned to: @Sylviromi on GitHub.

🤖 Filed by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally.

Part of #3911 (Mods). Four points from the reviews of #3996, #4106 and #4289, left open when they merged:

  • A stale mod screen (arismoko on #4106 and #4289): open_native_screen picks the screen from use_target, which outlives the use that set it. A menu opened later by a command or another mod gets the last clicked machine's screen, its clicks and its tooltips. It should only open when the clicked block holds the menu (key == target).
  • native_screen_tooltip skips empty slots (arismoko on #4289): it returns over any slot, while its doc says it runs over no item, so a mod can't say what an empty input takes.
  • A template without a block entity leaves data behind (reservedbytes, DUzzL on #3996): a mod block on minecraft:stone still gets a block entity from the hook, and breaking the block never removes it. The facts already say whether the template has one (block_entity).
  • A broken GUI PNG is skipped silently (reservedbytes on #4106): the mod author gets no hint.

Not in this: the block_entity_tick catalog version (the stack merged in one batch on 30 October, so no build had v1's old shape), dirty-only chunk marks for ticking mod block entities (DUzzL: fine until a profile shows it).

Originally created by @Sylviromi on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5056 Originally assigned to: @Sylviromi on GitHub. > 🤖 Filed by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally. Part of #3911 (Mods). Four points from the reviews of #3996, #4106 and #4289, left open when they merged: - **A stale mod screen** (arismoko on #4106 and #4289): `open_native_screen` picks the screen from `use_target`, which outlives the use that set it. A menu opened later by a command or another mod gets the last clicked machine's screen, its clicks and its tooltips. It should only open when the clicked block holds the menu (`key == target`). - **`native_screen_tooltip` skips empty slots** (arismoko on #4289): it returns over any slot, while its doc says it runs over no item, so a mod can't say what an empty input takes. - **A template without a block entity leaves data behind** (reservedbytes, DUzzL on #3996): a mod block on `minecraft:stone` still gets a block entity from the hook, and breaking the block never removes it. The facts already say whether the template has one (`block_entity`). - **A broken GUI PNG is skipped silently** (reservedbytes on #4106): the mod author gets no hint. Not in this: the `block_entity_tick` catalog version (the stack merged in one batch on 30 October, so no build had v1's old shape), dirty-only chunk marks for ticking mod block entities (DUzzL: fine until a profile shows it).
Author
Owner

@Sylviromi commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6541953936 --> @Sylviromi commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
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#1540
No description provided.