[PR #4110] [MERGED] Apply the block_break_speed attribute to mining speed #5424

Closed
opened 2026-11-03 05:12:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4110
Author: @DUzzL
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/issue-4094-block-break-speed


📝 Commits (1)

  • 91bd434 Apply block_break_speed attribute to mining speed

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game.rs (+2 -0)
📝 crates/horizon-client/src/game/enchant_effects.rs (+31 -0)
📝 crates/horizon-client/src/game/hand.rs (+3 -1)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #4094

Cause: /attribute ... minecraft:block_break_speed base set was stored, but the destroy-speed code never read it.

Change: Game::block_break_speed() in game/enchant_effects.rs returns the attribute base (default 1.0). It is applied as a multiplier in tick_mining (game.rs) and destroy_progress (game/hand.rs). The multiplier comes after tool speed, efficiency, haste and fatigue, and before the submerged and not-on-ground factors. One unit test.

Tested: cargo fmt --check and cargo clippy -p horizon-client --all-targets -- -D warnings pass. cargo test -p horizon-client --bins passes (194 and 18; 3 ignored), including the new test.

Not tested: no in-game run. The multiplier order is taken from memory of vanilla Player.getDestroySpeed, not checked against vanilla source (no .local vanilla data here). tools/pr_ready.py not run.


🔄 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/4110 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/issue-4094-block-break-speed` --- ### 📝 Commits (1) - [`91bd434`](https://github.com/horizon-rust/horizon/commit/91bd434281fa36c6bbe9738d79900ec489128fdb) Apply block_break_speed attribute to mining speed ### 📊 Changes **3 files changed** (+36 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+2 -0) 📝 `crates/horizon-client/src/game/enchant_effects.rs` (+31 -0) 📝 `crates/horizon-client/src/game/hand.rs` (+3 -1) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #4094 **Cause:** `/attribute ... minecraft:block_break_speed base set` was stored, but the destroy-speed code never read it. **Change:** `Game::block_break_speed()` in `game/enchant_effects.rs` returns the attribute base (default 1.0). It is applied as a multiplier in `tick_mining` (`game.rs`) and `destroy_progress` (`game/hand.rs`). The multiplier comes after tool speed, efficiency, haste and fatigue, and before the submerged and not-on-ground factors. One unit test. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings` pass. `cargo test -p horizon-client --bins` passes (194 and 18; 3 ignored), including the new test. **Not tested:** no in-game run. The multiplier order is taken from memory of vanilla `Player.getDestroySpeed`, not checked against vanilla source (no `.local` vanilla data here). `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:29 +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#5424
No description provided.