[GH-ISSUE #6907] Mod container shift-click during a drag reaches native_menu_quick_move on a mod's own menu type #2249

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

Originally created by @arismoko on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6907

Originally assigned to: @breachato on GitHub.

🤖 Filed by Aria's agent swarm, Dyna, not by Aria.

Follow-up to #6884 (native_menu_quick_move), from our review there. Checked on main at ce018133ee.

What happens: on a content mod's own menu type, a shift-click sent while a drag (quick-craft) is in progress goes to the mods' native_menu_quick_move, and they can move items. Vanilla AbstractContainerMenu.doClick handles any click other than quick-craft during a drag (quickcraftStatus != 0) by only calling resetQuickCraft. Horizon's own port does the same: crates/horizon-client/src/menu.rs:2640.

Why:

  • The drag guard checks menu.drag, which is the hub menu's drag (crates/horizon-client/src/game/native_quick_move.rs:122).
  • Clicks on a mod menu type (Kind::Mod) are handled by lan_machine_click. It keeps the drag state in the per-connection machine Menu (crates/horizon-client/src/game/lan_crafting.rs:284-292 and :370), not in the hub menu's drag. So for these menus menu.drag is always None.
  • lan_mod_quick_move runs before lan_machine_click (crates/horizon-client/src/game/lan_actions.rs:2209 and :2213), so the shift-click reaches the mods first.
  • When a mod handles the click, native_quick_move.rs:144-152 sets play.crafting.machine = None. That drops the cached machine Menu, so the drag is lost without the reset path running.

Suggested fix: on a mod menu type, also check whether the cached machine Menu for that window has a quick-craft in progress. If it does, leave the click to lan_machine_click, which resets the drag the way doClick does.

How to check: use a mod container on its own menu type. Start a drag with a carried stack across a slot, then shift-click a slot before releasing. Vanilla only ends the drag; today the mod's hook moves the stack. horizon-machine-sample is the recommended end-to-end route, with a throwaway native_menu_quick_move handler like the one in #6884's review. This issue comes from reading the code, not from a game test: our in-game run of #6884 at d2c99b0 covered plain shift-clicks only, on the server thread and on a dedicated server.

Originally created by @arismoko on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6907 Originally assigned to: @breachato on GitHub. > 🤖 Filed by Aria's agent swarm, Dyna, not by Aria. Follow-up to #6884 (`native_menu_quick_move`), from our review there. Checked on main at `ce018133ee`. **What happens:** on a content mod's own menu type, a shift-click sent while a drag (quick-craft) is in progress goes to the mods' `native_menu_quick_move`, and they can move items. Vanilla `AbstractContainerMenu.doClick` handles any click other than quick-craft during a drag (`quickcraftStatus != 0`) by only calling `resetQuickCraft`. Horizon's own port does the same: `crates/horizon-client/src/menu.rs:2640`. **Why:** - The drag guard checks `menu.drag`, which is the hub menu's drag (`crates/horizon-client/src/game/native_quick_move.rs:122`). - Clicks on a mod menu type (`Kind::Mod`) are handled by `lan_machine_click`. It keeps the drag state in the per-connection machine `Menu` (`crates/horizon-client/src/game/lan_crafting.rs:284-292` and `:370`), not in the hub menu's `drag`. So for these menus `menu.drag` is always `None`. - `lan_mod_quick_move` runs before `lan_machine_click` (`crates/horizon-client/src/game/lan_actions.rs:2209` and `:2213`), so the shift-click reaches the mods first. - When a mod handles the click, `native_quick_move.rs:144-152` sets `play.crafting.machine = None`. That drops the cached machine `Menu`, so the drag is lost without the reset path running. **Suggested fix:** on a mod menu type, also check whether the cached machine `Menu` for that window has a quick-craft in progress. If it does, leave the click to `lan_machine_click`, which resets the drag the way `doClick` does. **How to check:** use a mod container on its own menu type. Start a drag with a carried stack across a slot, then shift-click a slot before releasing. Vanilla only ends the drag; today the mod's hook moves the stack. [horizon-machine-sample](https://github.com/arismoko/horizon-machine-sample) is the recommended end-to-end route, with a throwaway `native_menu_quick_move` handler like the one in #6884's review. This issue comes from reading the code, not from a game test: our in-game run of #6884 at `d2c99b0` covered plain shift-clicks only, on the server thread and on a dedicated server.
Author
Owner

@breachato commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6572740383 --> @breachato commented on GitHub (Nov 2, 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#2249
No description provided.