[PR #6920] [MERGED] A shift-click during a drag on a mod menu type only ends the drag #7195

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

📋 Pull Request Information

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

Base: main ← Head: fix/6907-mod-menu-drag-quick-move


📝 Commits (1)

  • 77613e9 A shift-click during a drag on a mod menu type only ends the drag

📊 Changes

2 files changed (+38 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/native_quick_move.rs (+11 -0)
📝 crates/horizon-client/src/menu.rs (+27 -0)

📄 Description

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

What and why

Fixes #6907.

On a content mod's own menu type, a shift-click sent while a drag (quick craft) was in progress reached the mods' native_menu_quick_move, so a mod could move items. Vanilla's AbstractContainerMenu.doClick answers any click other than a quick craft during a drag (quickcraftStatus != 0) with resetQuickCraft only.

lan_mod_quick_move guarded on menu.drag, the hub menu's drag, which a mod menu type never sets: lan_machine_click keeps that drag in the connection's cached machine Menu (play.crafting.machine). And a handled click then cleared that cache, so the drag was dropped without the reset.

Menu::quick_crafting now tells whether a drag is in progress, and lan_mod_quick_move leaves the click to the game's own path when the cached machine menu for that window is mid-drag. lan_machine_click then runs Menu::click, which ends the drag the way doClick does. Vanilla menu types keep their menu.drag check.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

  • net.minecraft.world.inventory.AbstractContainerMenu.doClick: else if (this.quickcraftStatus != 0) { this.resetQuickCraft(); } before the pickup / quick move branch.

New test menu::tests::a_quick_move_during_a_drag_only_ends_it: a drag started over a chest slot shows as quick_crafting, and a shift-click during it moves nothing and ends it. Not run in game with a mod menu type (no mod bundle with a custom menu on this machine); the issue's horizon-machine-sample route is the end-to-end check.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-G0M27UC, against upstream/main at e0bafed17, 11 min 49 s)

Check Result
Scope ✅ 2 files, +38 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 610 passed (3 min 12 s)
rustfmt ✅ (16 s)
clippy ✅ (3 min 39 s)
tests: horizon-client, horizon-client-lib ✅ 2041 passed (4 min 4 s)
doc tests ✅ 0 passed (7 s)
content root tests ➖ content root untouched
mod API up to date ❌ failed (27 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

"mod API up to date" failed on new_hook_placeholder_is_reported_then_filled, an xtask test this PR doesn't touch: on a Windows checkout (core.autocrlf) it compares the generator's LF output with the CRLF file. Fixed separately in breachato:fix/xtask-placeholder-test-crlf; generated_output_is_current and the other 16 xtask tests passed.

🤖 Generated with Claude Code


🔄 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/6920 **Author:** [@breachato](https://github.com/breachato) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6907-mod-menu-drag-quick-move` --- ### 📝 Commits (1) - [`77613e9`](https://github.com/horizon-rust/horizon/commit/77613e92506aba693888eca00193e79269946176) A shift-click during a drag on a mod menu type only ends the drag ### 📊 Changes **2 files changed** (+38 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/native_quick_move.rs` (+11 -0) 📝 `crates/horizon-client/src/menu.rs` (+27 -0) </details> ### 📄 Description > 🤖 Opened by breachato's AI agent (Claude Code, Claude Opus 5.5), not by breachato personally. ## What and why Fixes #6907. On a content mod's own menu type, a shift-click sent while a drag (quick craft) was in progress reached the mods' `native_menu_quick_move`, so a mod could move items. Vanilla's `AbstractContainerMenu.doClick` answers any click other than a quick craft during a drag (`quickcraftStatus != 0`) with `resetQuickCraft` only. `lan_mod_quick_move` guarded on `menu.drag`, the hub menu's drag, which a mod menu type never sets: `lan_machine_click` keeps that drag in the connection's cached machine `Menu` (`play.crafting.machine`). And a handled click then cleared that cache, so the drag was dropped without the reset. `Menu::quick_crafting` now tells whether a drag is in progress, and `lan_mod_quick_move` leaves the click to the game's own path when the cached machine menu for that window is mid-drag. `lan_machine_click` then runs `Menu::click`, which ends the drag the way `doClick` does. Vanilla menu types keep their `menu.drag` check. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference - `net.minecraft.world.inventory.AbstractContainerMenu.doClick`: `else if (this.quickcraftStatus != 0) { this.resetQuickCraft(); }` before the pickup / quick move branch. New test `menu::tests::a_quick_move_during_a_drag_only_ends_it`: a drag started over a chest slot shows as `quick_crafting`, and a shift-click during it moves nothing and ends it. Not run in game with a mod menu type (no mod bundle with a custom menu on this machine); the issue's horizon-machine-sample route is the end-to-end check. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-G0M27UC, against upstream/main at e0bafed17, 11 min 49 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +38 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 610 passed (3 min 12 s) | | rustfmt | ✅ (16 s) | | clippy | ✅ (3 min 39 s) | | tests: horizon-client, horizon-client-lib | ✅ 2041 passed (4 min 4 s) | | doc tests | ✅ 0 passed (7 s) | | content root tests | ➖ content root untouched | | mod API up to date | ❌ failed (27 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | "mod API up to date" failed on `new_hook_placeholder_is_reported_then_filled`, an xtask test this PR doesn't touch: on a Windows checkout (`core.autocrlf`) it compares the generator's LF output with the CRLF file. Fixed separately in breachato:fix/xtask-placeholder-test-crlf; `generated_output_is_current` and the other 16 xtask tests passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:35:31 +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#7195
No description provided.