[PR #2663] [MERGED] Swing the right arm and for the right time on other players #4518

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

📋 Pull Request Information

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

Base: main ← Head: fix/remote-swing-hand-duration


📝 Commits (3)

  • 2a11323 Swing the right arm and for the right time on other players
  • 78e635f Merge main into fix/remote-swing-hand-duration
  • b124bea Merge main into fix/remote-swing-hand-duration

📊 Changes

4 files changed (+66 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/lan.rs (+2 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+2 -1)
📝 crates/horizon-client/src/game/remote.rs (+8 -1)
📝 crates/horizon-client/src/mobs/ai.rs (+54 -6)

📄 Description

What and why

Other players' arm swings ignored two things: which hand swung and how long the swing lasts.

  • A swing of the off hand now moves the off-hand arm. The arm follows the player's main arm: for a left-handed player the main hand swings the left arm. The main arm is read from the player's entity data on a client, and from the guest's client settings on a LAN host.
  • A swing now lasts as long as vanilla says. On a LAN host the guest's own swing length is used, so haste and mining fatigue show. On a client the length is worked out from the effects the client knows for that entity.
  • A new swing in the first half of the current one is still ignored, as before, but the half now follows the swing's real length.

Mobs that swing by their own AI still use 6 ticks and no hand.

Vanilla reference

  • ClientPacketListener.handleSwingAnimation
  • LivingEntity.swing(hand, animation, sendToSwingingEntity), getModifiedSwingDuration
  • LivingEntity.SwingState.startIfAble

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/2663 **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/remote-swing-hand-duration` --- ### 📝 Commits (3) - [`2a11323`](https://github.com/horizon-rust/horizon/commit/2a1132387f318caf43e421ad4ba0094e8c00c661) Swing the right arm and for the right time on other players - [`78e635f`](https://github.com/horizon-rust/horizon/commit/78e635fe3e713e9cdae9a8d9b2b4948bdfc2620e) Merge main into fix/remote-swing-hand-duration - [`b124bea`](https://github.com/horizon-rust/horizon/commit/b124beafebcb886b3d179c9782a59857291a9ef6) Merge main into fix/remote-swing-hand-duration ### 📊 Changes **4 files changed** (+66 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan.rs` (+2 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+2 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+8 -1) 📝 `crates/horizon-client/src/mobs/ai.rs` (+54 -6) </details> ### 📄 Description ## What and why Other players' arm swings ignored two things: which hand swung and how long the swing lasts. - A swing of the off hand now moves the off-hand arm. The arm follows the player's main arm: for a left-handed player the main hand swings the left arm. The main arm is read from the player's entity data on a client, and from the guest's client settings on a LAN host. - A swing now lasts as long as vanilla says. On a LAN host the guest's own swing length is used, so haste and mining fatigue show. On a client the length is worked out from the effects the client knows for that entity. - A new swing in the first half of the current one is still ignored, as before, but the half now follows the swing's real length. Mobs that swing by their own AI still use 6 ticks and no hand. ## Vanilla reference - `ClientPacketListener.handleSwingAnimation` - `LivingEntity.swing(hand, animation, sendToSwingingEntity)`, `getModifiedSwingDuration` - `LivingEntity.SwingState.startIfAble` ## 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:44 +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#4518
No description provided.