[PR #2386] [MERGED] Push the other players too with a mace smash #4266

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

📋 Pull Request Information

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

Base: main ← Head: fix/mace-smash-knockback-players


📝 Commits (2)

  • 10d2b20 Push the other players too with a mace smash
  • ede89f4 Merge main into fix/mace-smash-knockback-players

📊 Changes

3 files changed (+99 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+3 -0)
📝 crates/horizon-client/src/game/mace.rs (+95 -29)
📝 crates/horizon-client/src/game/wind.rs (+1 -0)

📄 Description

What and why

A mace smash pushed the mobs and armor stands within 3.5 blocks of the target, but never other players. With friends on a LAN, the host and the guests stood still next to a smash.

The smash now also pushes the host and the guests (all but the attacker), with the same power, distance falloff, double push after a fall of more than five blocks, and knockback resistance as for mobs. It skips spectators, creative players who are flying, and players on the attacker's team. When a guest smashes, the push waits until that guest's turn ends (like the mace's wind burst already does), so it can reach the host and the other guests. The guests' new motion is sent to their clients.

Vanilla reference

  • MaceItem.knockback: pushes every LivingEntity within 3.5 blocks of the target that passes knockbackPredicate, then nearby.push(x, 0.7, z) and a motion packet for a ServerPlayer.
  • MaceItem.knockbackPredicate: not a spectator, not the attacker or the target, not allied to the attacker, within range, not a creative player flying.
  • MaceItem.getKnockbackPower: (3.5 - distance) * 0.7 * (fallDistance > 5 ? 2 : 1) * (1 - KNOCKBACK_RESISTANCE).

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/2386 **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/mace-smash-knockback-players` --- ### 📝 Commits (2) - [`10d2b20`](https://github.com/horizon-rust/horizon/commit/10d2b202d562c271134685abf7faa3e0350aa7ee) Push the other players too with a mace smash - [`ede89f4`](https://github.com/horizon-rust/horizon/commit/ede89f4d3769a48d81d9008679629a2d91abb51d) Merge main into fix/mace-smash-knockback-players ### 📊 Changes **3 files changed** (+99 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -0) 📝 `crates/horizon-client/src/game/mace.rs` (+95 -29) 📝 `crates/horizon-client/src/game/wind.rs` (+1 -0) </details> ### 📄 Description ## What and why A mace smash pushed the mobs and armor stands within 3.5 blocks of the target, but never other players. With friends on a LAN, the host and the guests stood still next to a smash. The smash now also pushes the host and the guests (all but the attacker), with the same power, distance falloff, double push after a fall of more than five blocks, and knockback resistance as for mobs. It skips spectators, creative players who are flying, and players on the attacker's team. When a guest smashes, the push waits until that guest's turn ends (like the mace's wind burst already does), so it can reach the host and the other guests. The guests' new motion is sent to their clients. ## Vanilla reference - `MaceItem.knockback`: pushes every `LivingEntity` within 3.5 blocks of the target that passes `knockbackPredicate`, then `nearby.push(x, 0.7, z)` and a motion packet for a `ServerPlayer`. - `MaceItem.knockbackPredicate`: not a spectator, not the attacker or the target, not allied to the attacker, within range, not a creative player flying. - `MaceItem.getKnockbackPower`: `(3.5 - distance) * 0.7 * (fallDistance > 5 ? 2 : 1) * (1 - KNOCKBACK_RESISTANCE)`. ## 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:55 +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#4266
No description provided.