[GH-ISSUE #1329] [both singleplayer modes] Cursor-held items survive death with keep_inventory disabled #363

Closed
opened 2026-11-02 15:38:31 +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/1329

Tested commit: 83fa14e51b89eab728b8e233e9e5d95296bef93d. Reproduces with explicit --no-server-thread and --server-thread, render distance 4.

  1. Set gamerule keep_inventory false, clear inventory, and give yourself 7 diamonds.
  2. Move away from spawn, open inventory and pick the diamonds up onto the cursor.
  3. Die while that menu is open (kill @s was used), then click Respawn.
  4. Reopen inventory and put the cursor stack into an empty slot.

Expected: death resolves the carried stack and clears the cursor; it must not carry protected items into the respawned inventory with this rule disabled.

Actual: all 7 diamonds remain on the cursor in both modes. After placing them into a slot, authoritative clear @s diamond 0 finds 7. There is no diamond item entity at the death site. Death and spawn were 10 blocks apart, excluding pickup. This is real retained inventory, not merely a client ghost.

This is independently fixable from #1284: that issue concerns ordinary inventory slots in threaded mode; cursor retention also affects old mode. Native 26.3 creates a fresh player's inventory menu on respawn rather than preserving this carried stack.

Hypothesis: carried menu state is not resolved/reset on death and respawn.

Acceptance: death with keep_inventory=false clears the cursor and handles the stack once, without retention or duplication.

Evidence: tools/singleplayer_sequence_audit.py --case cursor-death --render-distance 4, .local/singleplayer-audit/sequence-a/cursor-death-*/; earlier menu/death sequences also exposed stale cursor state. Existing cursor/death issue search found no matching report.

Originally created by @rdbtCVS on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1329 Tested commit: `83fa14e51b89eab728b8e233e9e5d95296bef93d`. Reproduces with explicit `--no-server-thread` and `--server-thread`, render distance 4. 1. Set `gamerule keep_inventory false`, clear inventory, and give yourself 7 diamonds. 2. Move away from spawn, open inventory and pick the diamonds up onto the cursor. 3. Die while that menu is open (`kill @s` was used), then click Respawn. 4. Reopen inventory and put the cursor stack into an empty slot. Expected: death resolves the carried stack and clears the cursor; it must not carry protected items into the respawned inventory with this rule disabled. Actual: all 7 diamonds remain on the cursor in both modes. After placing them into a slot, authoritative `clear @s diamond 0` finds **7**. There is no diamond item entity at the death site. Death and spawn were 10 blocks apart, excluding pickup. This is real retained inventory, not merely a client ghost. This is independently fixable from #1284: that issue concerns ordinary inventory slots in threaded mode; cursor retention also affects old mode. Native 26.3 creates a fresh player's inventory menu on respawn rather than preserving this carried stack. Hypothesis: carried menu state is not resolved/reset on death and respawn. Acceptance: death with keep_inventory=false clears the cursor and handles the stack once, without retention or duplication. Evidence: `tools/singleplayer_sequence_audit.py --case cursor-death --render-distance 4`, `.local/singleplayer-audit/sequence-a/cursor-death-*/`; earlier menu/death sequences also exposed stale cursor state. Existing cursor/death issue search found no matching report.
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#363
No description provided.