[PR #2644] [MERGED] Restart a break when the held item changes and reset the attack strength when it stops #4499

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

📋 Pull Request Information

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

Base: main ← Head: fix/remote-break-item-change


📝 Commits (2)

  • 29ab669 Restart a break when the held item changes and reset the attack strength when it stops
  • 6d69bba Remote mining test fixture: the held-item key and the attack strength reset

📊 Changes

3 files changed (+21 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/game/hand.rs (+6 -3)
📝 crates/horizon-client/src/game/remote.rs (+12 -5)
📝 tests/test_remote_mining.py (+3 -1)

📄 Description

What and why

On the server thread, switching the held item while the attack button is held did not restart the break. The break only compared the block position, so the crack and progress carried over to the new tool. Now the break restarts when the held item changes (abort the old one, start again from zero), as the local path already does.

Also, letting go of the attack button during a break did not start the attack strength again. The next hit on a mob was a full-strength hit. Now stopping a break resets the attack strength ticker.

Vanilla reference

  • MultiPlayerGameMode.sameDestroyTarget and startDestroyBlock (aborts the old break when the target is not the same)
  • MultiPlayerGameMode.stopDestroyBlock (resetAttackStrengthTicker)

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/2644 **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-break-item-change` --- ### 📝 Commits (2) - [`29ab669`](https://github.com/horizon-rust/horizon/commit/29ab66935e357a547da200a59af3162e36dbef93) Restart a break when the held item changes and reset the attack strength when it stops - [`6d69bba`](https://github.com/horizon-rust/horizon/commit/6d69bba15ee6630c2bb88e48b0c34deb9e317508) Remote mining test fixture: the held-item key and the attack strength reset ### 📊 Changes **3 files changed** (+21 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/hand.rs` (+6 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+12 -5) 📝 `tests/test_remote_mining.py` (+3 -1) </details> ### 📄 Description ## What and why On the server thread, switching the held item while the attack button is held did not restart the break. The break only compared the block position, so the crack and progress carried over to the new tool. Now the break restarts when the held item changes (abort the old one, start again from zero), as the local path already does. Also, letting go of the attack button during a break did not start the attack strength again. The next hit on a mob was a full-strength hit. Now stopping a break resets the attack strength ticker. ## Vanilla reference - `MultiPlayerGameMode.sameDestroyTarget` and `startDestroyBlock` (aborts the old break when the target is not the same) - `MultiPlayerGameMode.stopDestroyBlock` (`resetAttackStrengthTicker`) ## 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:36 +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#4499
No description provided.