[PR #1102] [MERGED] No block placing or item use while an item is in use (shield, bow, food) #3046

Closed
opened 2026-11-02 16:01:04 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/no-use-while-using-item


📝 Commits (1)

  • 2c47e79 Use: no block placing or item use while an item is in use

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+6 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #1050. Reported by Visivel on Discord: thanks!

What

While an item is in use (a raised shield, a drawn bow, food being eaten), right-click no longer places blocks, spawn eggs, boats... or uses anything else.

Why

Minecraft.handleKeybinds calls startUseItem only when !player.isUsingItem(): use clicks are consumed, and held use doesn't repeat. Horizon repeated held use every 4 ticks whatever the state, so with a shield raised in the off hand, aiming at a block placed the main hand's block.

How

game.rs: the held-use repeat and the use click check using.

Proof

Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main caeffffb, on the Mac mini:

cargo fmt --all --check                                                   ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings    exit 0
cargo test -p horizon-client -p horizon-world                             all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...)

tools/parity.py --changed origin/main (selects 304 of 326 harnesses: the branches touch game.rs): running on the integration commit; the result follows in a comment.

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 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/1102 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/no-use-while-using-item` --- ### 📝 Commits (1) - [`2c47e79`](https://github.com/horizon-rust/horizon/commit/2c47e79cc7dd3e2e46229a8ec02e28bd590f082b) Use: no block placing or item use while an item is in use ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1050. Reported by **Visivel** on Discord: thanks! ## What While an item is in use (a raised shield, a drawn bow, food being eaten), right-click no longer places blocks, spawn eggs, boats... or uses anything else. ## Why `Minecraft.handleKeybinds` calls `startUseItem` only when `!player.isUsingItem()`: use clicks are consumed, and held use doesn't repeat. Horizon repeated held use every 4 ticks whatever the state, so with a shield raised in the off hand, aiming at a block placed the main hand's block. ## How `game.rs`: the held-use repeat and the use click check `using`. ## Proof Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main `caeffffb`, on the Mac mini: ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0 cargo test -p horizon-client -p horizon-world all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...) ``` `tools/parity.py --changed origin/main` (selects 304 of 326 harnesses: the branches touch `game.rs`): running on the integration commit; the result follows in a comment. ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:01:04 +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#3046
No description provided.