[PR #2650] [MERGED] Let a player's axe hit disable the victim's shield #4507

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

📋 Pull Request Information

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

Base: main ← Head: fix/pvp-axe-disables-shield


📝 Commits (1)

  • 4afb574 Let a player's axe hit disable the victim's shield

📊 Changes

3 files changed (+40 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/combat.rs (+4 -0)
📝 crates/horizon-client/src/game/lan_pvp.rs (+13 -0)
📝 crates/horizon-client/src/game/shield.rs (+23 -1)

📄 Description

What and why

When another player hit someone who was blocking with a shield, nothing happened to the shield, even with an axe. The hit was treated as having no attacker, so the shield was never disabled and the blocked hit did not push the defender back.

Now a player's melee hit passes its attacker position and weapon to the victim's block code. An axe (or any item whose weapon component disables blocking) disables the shield and starts the cooldown, and a partly blocked hit knocks the defender back. This works for the host and for guests, on both sides of the hit.

The tail of after_block (knockback, then disable) moved into a small helper so mobs and players share it.

Vanilla reference

  • Player.blockUsingItem and BlocksAttacks.disable
  • LivingEntity.getSecondsToDisableBlocking and LivingEntity.blockedByItem
  • LivingEntity.applyItemBlocking, which calls blockUsingItem for any living direct attacker that is not a projectile

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/2650 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/pvp-axe-disables-shield` --- ### 📝 Commits (1) - [`4afb574`](https://github.com/horizon-rust/horizon/commit/4afb5748f2312a5f274cb5523893ab79693d5ca9) Let a player's axe hit disable the victim's shield ### 📊 Changes **3 files changed** (+40 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/combat.rs` (+4 -0) 📝 `crates/horizon-client/src/game/lan_pvp.rs` (+13 -0) 📝 `crates/horizon-client/src/game/shield.rs` (+23 -1) </details> ### 📄 Description ## What and why When another player hit someone who was blocking with a shield, nothing happened to the shield, even with an axe. The hit was treated as having no attacker, so the shield was never disabled and the blocked hit did not push the defender back. Now a player's melee hit passes its attacker position and weapon to the victim's block code. An axe (or any item whose weapon component disables blocking) disables the shield and starts the cooldown, and a partly blocked hit knocks the defender back. This works for the host and for guests, on both sides of the hit. The tail of `after_block` (knockback, then disable) moved into a small helper so mobs and players share it. ## Vanilla reference - `Player.blockUsingItem` and `BlocksAttacks.disable` - `LivingEntity.getSecondsToDisableBlocking` and `LivingEntity.blockedByItem` - `LivingEntity.applyItemBlocking`, which calls `blockUsingItem` for any living direct attacker that is not a projectile ## 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:17:40 +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#4507
No description provided.