[PR #2327] [MERGED] Apply Unbreaking to armor wear from Thorns #4207

Closed
opened 2026-11-03 04:15:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2327
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/thorns-unbreaking


📝 Commits (1)

  • dbef78b Apply Unbreaking to armor wear from Thorns

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/enchant_effects.rs (+3 -1)

📄 Description

What and why

When thorns hurt an attacker, the worn armor piece always lost exactly 2 durability, even with Unbreaking on it. In vanilla the thorns wear goes through hurtAndBreak, so Unbreaking can cancel points. The wear now uses the same durability loss as other items (durability_loss). This covers both mob hits and the PvP path, which share thorns_damage.

Vanilla reference

  • data/minecraft/enchantment/thorns.json: change_item_damage amount 2.
  • ChangeItemDamage.apply calls ItemStack.hurtAndBreak, which runs EnchantmentHelper.processDurabilityChange.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2327 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/thorns-unbreaking` --- ### 📝 Commits (1) - [`dbef78b`](https://github.com/horizon-rust/horizon/commit/dbef78bcb82f2b123f17c3358aa65aa7953a4f41) Apply Unbreaking to armor wear from Thorns ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/enchant_effects.rs` (+3 -1) </details> ### 📄 Description ## What and why When thorns hurt an attacker, the worn armor piece always lost exactly 2 durability, even with Unbreaking on it. In vanilla the thorns wear goes through `hurtAndBreak`, so Unbreaking can cancel points. The wear now uses the same durability loss as other items (`durability_loss`). This covers both mob hits and the PvP path, which share `thorns_damage`. ## Vanilla reference - `data/minecraft/enchantment/thorns.json`: `change_item_damage` amount 2. - `ChangeItemDamage.apply` calls `ItemStack.hurtAndBreak`, which runs `EnchantmentHelper.processDurabilityChange`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:29 +07:00
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#4207
No description provided.