[GH-ISSUE #1349] [both singleplayer modes] Mending ignores damaged equipment in the offhand #377

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

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

Tested 83fa14e51b89eab728b8e233e9e5d95296bef93d; affects both --no-server-thread and --server-thread. This is shared incorrect behavior, not a threaded-only regression.

Reproduce

  1. In survival, run /give @s diamond_pickaxe[damage=100,enchantments={"minecraft:mending":1}].
  2. Hold it, press F to put it in the offhand, and collect a seven-point orb: /summon experience_orb ~4 ~ ~ {Value:7s}.
  3. Wait for pickup. Press F to hold the same tool in the main hand and collect another identical orb.

Expected: Either hand qualifies for Mending. Each orb repairs 14 durability while the tool is damaged.

Actual: Offhand damage stays 100 and the player gains seven XP. Moving that same tool to the main hand repairs it to damage 86 without granting more XP. Reproduced in two fresh paired runs; authoritative equipment NBT confirms the unchanged offhand damage.

Native 26.3 control repairs the offhand tool from 100 to 86 and awards zero XP.

Evidence: .local/singleplayer-audit/items-e/mending-swap-{old,threaded}/result.json, items-c/mending-hands-*/result.json, and native-mending-reference-d/check.log. Driver: tools/singleplayer_items_audit.py --case mending-swap. No existing Mending issue found.

Hypothesis: Game::mending selects main-hand/armor candidates but omits offhand.

Acceptance: The offhand tool repairs identically to the main-hand control; XP is only awarded for the unspent portion.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1349 Tested `83fa14e51b89eab728b8e233e9e5d95296bef93d`; affects both `--no-server-thread` and `--server-thread`. This is shared incorrect behavior, not a threaded-only regression. **Reproduce** 1. In survival, run `/give @s diamond_pickaxe[damage=100,enchantments={"minecraft:mending":1}]`. 2. Hold it, press F to put it in the offhand, and collect a seven-point orb: `/summon experience_orb ~4 ~ ~ {Value:7s}`. 3. Wait for pickup. Press F to hold the same tool in the main hand and collect another identical orb. **Expected:** Either hand qualifies for Mending. Each orb repairs 14 durability while the tool is damaged. **Actual:** Offhand damage stays 100 and the player gains seven XP. Moving that same tool to the main hand repairs it to damage 86 without granting more XP. Reproduced in two fresh paired runs; authoritative equipment NBT confirms the unchanged offhand damage. Native 26.3 control repairs the offhand tool from 100 to 86 and awards zero XP. Evidence: `.local/singleplayer-audit/items-e/mending-swap-{old,threaded}/result.json`, `items-c/mending-hands-*/result.json`, and `native-mending-reference-d/check.log`. Driver: `tools/singleplayer_items_audit.py --case mending-swap`. No existing Mending issue found. **Hypothesis:** `Game::mending` selects main-hand/armor candidates but omits offhand. **Acceptance:** The offhand tool repairs identically to the main-hand control; XP is only awarded for the unspent portion.
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#377
No description provided.