[PR #2657] [MERGED] Haste and Mining Fatigue change the attack speed and attack strength #4510

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

📋 Pull Request Information

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

Base: main ← Head: fix/attack-speed-effects


📝 Commits (2)

  • 1131a29 Apply Haste and Mining Fatigue to the attack speed
  • 24d06f5 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

3 files changed (+17 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -2)
📝 crates/horizon-client/src/game/dragon.rs (+4 -7)
📝 crates/horizon-client/src/game/hand.rs (+12 -3)

📄 Description

What and why

Haste and Mining Fatigue change the player's attack speed attribute, but Horizon only used the base value plus the held item. Now the attack speed takes the effect modifiers too (each level adds or removes 10%, multiplied on the total, clamped to 0..1024).

This drives the attack indicator and the item swap scale, and also the attack strength used for damage and the sweep/crit checks (attack_strength_scale, and the ender dragon hit, which had their own copy of the formula).

Vanilla reference

  • MobEffects.HASTE and MobEffects.MINING_FATIGUE (Attributes.ATTACK_SPEED, ADD_MULTIPLIED_TOTAL, 0.1 and -0.1 per level).
  • Player.getCurrentItemAttackStrengthDelay, LivingEntity.getAttackStrengthScale.

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/2657 **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/attack-speed-effects` --- ### 📝 Commits (2) - [`1131a29`](https://github.com/horizon-rust/horizon/commit/1131a2910ddc732a65011d789875cf6d25497090) Apply Haste and Mining Fatigue to the attack speed - [`24d06f5`](https://github.com/horizon-rust/horizon/commit/24d06f5ce2385afc43e7ff0242b8df1cf4468336) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **3 files changed** (+17 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -2) 📝 `crates/horizon-client/src/game/dragon.rs` (+4 -7) 📝 `crates/horizon-client/src/game/hand.rs` (+12 -3) </details> ### 📄 Description ## What and why Haste and Mining Fatigue change the player's attack speed attribute, but Horizon only used the base value plus the held item. Now the attack speed takes the effect modifiers too (each level adds or removes 10%, multiplied on the total, clamped to 0..1024). This drives the attack indicator and the item swap scale, and also the attack strength used for damage and the sweep/crit checks (`attack_strength_scale`, and the ender dragon hit, which had their own copy of the formula). ## Vanilla reference - `MobEffects.HASTE` and `MobEffects.MINING_FATIGUE` (`Attributes.ATTACK_SPEED`, `ADD_MULTIPLIED_TOTAL`, 0.1 and -0.1 per level). - `Player.getCurrentItemAttackStrengthDelay`, `LivingEntity.getAttackStrengthScale`. ## 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:42 +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#4510
No description provided.