[GH-ISSUE #1283] [server-thread] Closing inventory drops the cursor stack and leaves a ghost copy #324

Closed
opened 2026-11-02 15:38:12 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @rdbtCVS on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1283

Tested commit: 83fa14e51b89eab728b8e233e9e5d95296bef93d (Linux/Vulkan, survival). Affects --server-thread singleplayer.

Reproduce

  1. Start with an otherwise empty inventory and 7 diamonds in the first hotbar slot.
  2. Open inventory and left-click that slot so the diamonds are on the cursor.
  3. Press Escape, wait at least 100 ticks, then reopen inventory.
  4. Repeat from the same save with explicit --no-server-thread.

Control sequence: open-inventory, click-slot 0, key esc tap, wait 100.

Expected: with free inventory space, closing the screen returns the carried stack to inventory and clears the cursor.
Actual: threaded mode throws all 7 diamonds into the world, leaves inventory slots empty and still displays 7 diamonds on the cursor after reopening.

Evidence: reduced fresh-world pair plus generated inventory/chest/crafting close/Escape sequences. Old mode returns 7 to slot 0, cursor empty, no item entity. Threaded mode still has an empty inventory, stale cursor stack and a settled 7-diamond item entity 3.34 blocks away after 110 ticks. This is not a demonstrated item-duplication exploit.

Hypothesis: server ContainerClose unconditionally drops carried; the client close path also leaves its cursor copy.

Acceptance: closing a live player's screen returns items when space exists, clears the cursor and preserves the real item total.

Related broad dropping report: #1233. Searches for carried/cursor/closing inventory found no matching isolated issue.

Originally created by @rdbtCVS on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1283 Tested commit: `83fa14e51b89eab728b8e233e9e5d95296bef93d` (Linux/Vulkan, survival). Affects `--server-thread` singleplayer. **Reproduce** 1. Start with an otherwise empty inventory and 7 diamonds in the first hotbar slot. 2. Open inventory and left-click that slot so the diamonds are on the cursor. 3. Press Escape, wait at least 100 ticks, then reopen inventory. 4. Repeat from the same save with explicit `--no-server-thread`. Control sequence: `open-inventory`, `click-slot 0`, `key esc tap`, `wait 100`. **Expected:** with free inventory space, closing the screen returns the carried stack to inventory and clears the cursor. **Actual:** threaded mode throws all 7 diamonds into the world, leaves inventory slots empty and still displays 7 diamonds on the cursor after reopening. **Evidence:** reduced fresh-world pair plus generated inventory/chest/crafting close/Escape sequences. Old mode returns 7 to slot 0, cursor empty, no item entity. Threaded mode still has an empty inventory, stale cursor stack and a settled 7-diamond item entity 3.34 blocks away after 110 ticks. This is not a demonstrated item-duplication exploit. **Hypothesis:** server `ContainerClose` unconditionally drops `carried`; the client close path also leaves its cursor copy. **Acceptance:** closing a live player's screen returns items when space exists, clears the cursor and preserves the real item total. Related broad dropping report: #1233. Searches for carried/cursor/closing inventory found no matching isolated issue.
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#324
No description provided.