[PR #2395] [MERGED] Horse armor protects the horse #4274

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

📋 Pull Request Information

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

Base: main ← Head: fix/horse-armor-protects


📝 Commits (1)

  • 2886b8f Horse armor reduces the damage a horse takes

📊 Changes

2 files changed (+20 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs.rs (+7 -1)
📝 crates/horizon-client/src/mobs/spawning.rs (+13 -0)

📄 Description

What and why

A horse wearing leather, iron, golden or diamond horse armor took full damage: Mob::worn_armor returned zero for every equine and only counted head, chest, legs and feet items. Horse armor items carry armor and armor_toughness attribute modifiers in the body slot, so a horse now gets them from the armor it wears (leather 3, copper 4, iron 5, golden 7, diamond 11 with 2 toughness, netherite 19 with 3 toughness). The existing damage formula then uses them.

Not done: the 0.1 knockback resistance of netherite horse armor.

Vanilla reference

  • Items.horseArmor gives the item ArmorMaterial.createAttributes(ArmorType.BODY).
  • ArmorMaterials (the makeDefense body value, toughness and knockback resistance of each material).
  • CombatRules.getDamageAfterAbsorb for how the armor and toughness reduce damage.

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/2395 **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/horse-armor-protects` --- ### 📝 Commits (1) - [`2886b8f`](https://github.com/horizon-rust/horizon/commit/2886b8f9badc4cb7e4e7a775a84ef83e961751b9) Horse armor reduces the damage a horse takes ### 📊 Changes **2 files changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs.rs` (+7 -1) 📝 `crates/horizon-client/src/mobs/spawning.rs` (+13 -0) </details> ### 📄 Description ## What and why A horse wearing leather, iron, golden or diamond horse armor took full damage: `Mob::worn_armor` returned zero for every equine and only counted head, chest, legs and feet items. Horse armor items carry `armor` and `armor_toughness` attribute modifiers in the body slot, so a horse now gets them from the armor it wears (leather 3, copper 4, iron 5, golden 7, diamond 11 with 2 toughness, netherite 19 with 3 toughness). The existing damage formula then uses them. Not done: the 0.1 knockback resistance of netherite horse armor. ## Vanilla reference - `Items.horseArmor` gives the item `ArmorMaterial.createAttributes(ArmorType.BODY)`. - `ArmorMaterials` (the `makeDefense` body value, toughness and knockback resistance of each material). - `CombatRules.getDamageAfterAbsorb` for how the armor and toughness reduce damage. ## 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:58 +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#4274
No description provided.