[GH-ISSUE #7480] Player armor wear ignores unbreakable and custom max_damage #3261

Open
opened 2026-11-03 04:07:05 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @TheMrZZ on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7480

Originally assigned to: @TheMrZZ on GitHub.

🤖 Filed by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

Player armor wear ignores the stack's minecraft:unbreakable and custom minecraft:max_damage components.

On a survival player, equip all four diamond armor pieces, heal, wait at least 25 ticks between cases, and apply /damage <player> 4 cactus:

  • Plain diamond armor: each piece takes 1 durability damage and remains equipped in both Java 26.3 and Horizon (control).
  • Armor with [minecraft:unbreakable={}]: Java adds no damage component; Horizon adds damage 1.
  • Armor with [minecraft:max_damage=10,minecraft:damage=9]: Java breaks all four pieces; Horizon keeps them equipped with damage 10.

The last case also exposed a separate same-hit reduction-order discrepancy: with maximum/current health 1000, Java ends at 996, but Horizon can end at 999.04 even after component-aware breakage is corrected. That deferred-wear ordering is a separate follow-up; this report is scoped to the stack components used for armor wear.

Expected: player armor wear uses the actual stack's damageability and maximum durability. This report concerns player armor; helmet-fall damage and mob equipment are separate paths.

The regression needs a real player tick / live LAN fixture. The command-execution oracle does not provide valid heal/health setup for this scenario.

Originally created by @TheMrZZ on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7480 Originally assigned to: @TheMrZZ on GitHub. > 🤖 Filed by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. Player armor wear ignores the stack's `minecraft:unbreakable` and custom `minecraft:max_damage` components. On a survival player, equip all four diamond armor pieces, heal, wait at least 25 ticks between cases, and apply `/damage <player> 4 cactus`: - Plain diamond armor: each piece takes 1 durability damage and remains equipped in both Java 26.3 and Horizon (control). - Armor with `[minecraft:unbreakable={}]`: Java adds no damage component; Horizon adds damage 1. - Armor with `[minecraft:max_damage=10,minecraft:damage=9]`: Java breaks all four pieces; Horizon keeps them equipped with damage 10. The last case also exposed a separate same-hit reduction-order discrepancy: with maximum/current health 1000, Java ends at 996, but Horizon can end at 999.04 even after component-aware breakage is corrected. That deferred-wear ordering is a separate follow-up; this report is scoped to the stack components used for armor wear. Expected: player armor wear uses the actual stack's damageability and maximum durability. This report concerns player armor; helmet-fall damage and mob equipment are separate paths. The regression needs a real player tick / live LAN fixture. The command-execution oracle does not provide valid heal/health setup for this scenario.
Author
Owner

@TheMrZZ commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6582491645 --> @TheMrZZ commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
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#3261
No description provided.