[GH-ISSUE #1293] [server-thread] Releasing use does not cancel eating from the offhand #331

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

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

Tested commit: 83fa14e51b.

  1. Launch survival with --server-thread.
  2. Leave the main hand empty and put one golden apple in the offhand.
  3. Look into the air, hold use briefly (about 0.35 seconds), then release well before eating should finish.
  4. Wait three seconds. Repeat with --no-server-thread.

Expected: releasing use cancels eating; the apple remains and grants no effects.

Actual: threaded mode finishes eating after release, consumes the apple and grants regeneration/absorption. Old mode cancels and retains it. Reproduced in two fresh paired worlds. The same brief main-hand action cancels in both modes; holding use long enough consumes normally in both hands/modes.

Hypothesis: remote_tick_using clears offhand consumable use because its slot differs from the selected hotbar slot. With local using already cleared, releasing the button does not send the server a release-use action.

Acceptance: releasing use before completion cancels offhand consumption on both client and server, preserving the item and its effects.

Evidence: tools/singleplayer_code_audit.py --case offhand-food --case offhand-repeat; full traces/saves under .local/singleplayer-audit/code-audit-{a,b}/. Only read-only diagnostics were added. Searches for offhand food/eating found no matching cancellation report.

A fresh milk-bucket pair confirms the same bug for drinking: release after the short press leaves milk and Speed in old mode; threaded mode later replaces milk with an empty bucket and clears Speed (code-audit-b/offhand-milk).

Originally created by @rdbtCVS on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1293 Tested commit: 83fa14e51b89eab728b8e233e9e5d95296bef93d. 1. Launch survival with `--server-thread`. 2. Leave the main hand empty and put one golden apple in the offhand. 3. Look into the air, hold use briefly (about 0.35 seconds), then release well before eating should finish. 4. Wait three seconds. Repeat with `--no-server-thread`. Expected: releasing use cancels eating; the apple remains and grants no effects. Actual: threaded mode finishes eating after release, consumes the apple and grants regeneration/absorption. Old mode cancels and retains it. Reproduced in two fresh paired worlds. The same brief **main-hand** action cancels in both modes; holding use long enough consumes normally in both hands/modes. Hypothesis: `remote_tick_using` clears offhand consumable use because its slot differs from the selected hotbar slot. With local `using` already cleared, releasing the button does not send the server a release-use action. Acceptance: releasing use before completion cancels offhand consumption on both client and server, preserving the item and its effects. Evidence: `tools/singleplayer_code_audit.py --case offhand-food --case offhand-repeat`; full traces/saves under `.local/singleplayer-audit/code-audit-{a,b}/`. Only read-only diagnostics were added. Searches for offhand food/eating found no matching cancellation report. A fresh milk-bucket pair confirms the same bug for drinking: release after the short press leaves milk and Speed in old mode; threaded mode later replaces milk with an empty bucket and clears Speed (`code-audit-b/offhand-milk`).
Author
Owner

@rdbtCVS commented on GitHub (Oct 25, 2026):

🤖 Agent: rdbt's OpenCode agent (gpt-6.1-sol) is working on the offhand consumable cancellation fix and will open a PR. The Kira claim attempt was refused because this account already has three claimed issues.

<!-- gh-comment-id:6391927995 --> @rdbtCVS commented on GitHub (Oct 25, 2026): 🤖 Agent: rdbt's OpenCode agent (gpt-6.1-sol) is working on the offhand consumable cancellation fix and will open a PR. The Kira claim attempt was refused because this account already has three claimed issues.
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#331
No description provided.