[PR #4085] [MERGED] Bows and crossbows: no use animation with nothing to shoot #5411

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4085
Author: @DenisHumen
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/bow-no-arrows


📝 Commits (1)

  • 6297ea0 Bows and crossbows: no use animation with nothing to shoot

📊 Changes

1 file changed (+16 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+16 -7)

📄 Description

🤖 Opened by DenisHumen's AI agent (Claude Code, Opus 5.5), not by DenisHumen personally.

What

Right-clicking a bow, or an uncharged crossbow, with nothing to shoot no longer dips the hand as if the draw started and stopped.

Fixes #4079

Why

BowItem.use and CrossbowItem.use (uncharged) return FAIL without a projectile, unless the player has infinite materials. Minecraft.startUseItem calls itemUsed (the hand dip) only for a SUCCESS, and otherwise tries the other hand (26.3, javap).

remote_use_item didn't start the use, which was right, but it still reported the use as done, so remote_use_hands dipped the hand.

Fix

  • remote_start_held_use now returns false for a bow, or an uncharged crossbow, that it couldn't start. A charged crossbow still succeeds: it shoots.
  • remote_use_item then returns false, which passes the turn on.

Checked

  • In game, fast build with a scratch home and horizon-ctl: survival, only a bow, screenshots of the hand at rest and right after mouse right down.
    • Before: the bow drops out of view.
    • After: it stays.
  • With arrows, state.using still counts up: the draw still works.
  • pr_ready:
    • title::tests::each_world_preset_writes_its_own_generator fails on Windows with os error 267, in an unrelated test;
    • the clippy failure comes from lints new in clippy 1.96, in code this PR doesn't touch;
    • Parity can't start on Windows (fcntl).

pr_ready (tools/pr_ready.py --base upstream/main on DenisPC, against upstream/main at d6adbe1cb, 3 min 15 s)

Check Result
Scope ✅ 1 files, +16 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 475 passed (53 s)
rustfmt ✅ (6 s)
clippy ❌ failed (12 s)
tests: horizon-client ❌ 705 passed, 1 failed (1 min 58 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ❌ 362 affected, (1 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/4085 **Author:** [@DenisHumen](https://github.com/DenisHumen) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/bow-no-arrows` --- ### 📝 Commits (1) - [`6297ea0`](https://github.com/horizon-rust/horizon/commit/6297ea09f6b43f1f82570d4e6c4698bef8f794bb) Bows and crossbows: no use animation with nothing to shoot ### 📊 Changes **1 file changed** (+16 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+16 -7) </details> ### 📄 Description > 🤖 Opened by DenisHumen's AI agent (Claude Code, Opus 5.5), not by DenisHumen personally. ## What Right-clicking a bow, or an uncharged crossbow, with nothing to shoot no longer dips the hand as if the draw started and stopped. Fixes #4079 ## Why `BowItem.use` and `CrossbowItem.use` (uncharged) return `FAIL` without a projectile, unless the player has infinite materials. `Minecraft.startUseItem` calls `itemUsed` (the hand dip) only for a `SUCCESS`, and otherwise tries the other hand (26.3, `javap`). `remote_use_item` didn't start the use, which was right, but it still reported the use as done, so `remote_use_hands` dipped the hand. ## Fix - `remote_start_held_use` now returns false for a bow, or an uncharged crossbow, that it couldn't start. A charged crossbow still succeeds: it shoots. - `remote_use_item` then returns false, which passes the turn on. ## Checked - In game, fast build with a scratch home and `horizon-ctl`: survival, only a bow, screenshots of the hand at rest and right after `mouse right down`. - Before: the bow drops out of view. - After: it stays. - With arrows, `state.using` still counts up: the draw still works. - pr_ready: - `title::tests::each_world_preset_writes_its_own_generator` fails on Windows with os error 267, in an unrelated test; - the clippy failure comes from lints new in clippy 1.96, in code this PR doesn't touch; - Parity can't start on Windows (`fcntl`). **pr_ready** (`tools/pr_ready.py --base upstream/main` on DenisPC, against upstream/main at d6adbe1cb, 3 min 15 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +16 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 475 passed (53 s) | | rustfmt | ✅ (6 s) | | clippy | ❌ failed (12 s) | | tests: horizon-client | ❌ 705 passed, 1 failed (1 min 58 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ❌ 362 affected, (1 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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-03 05:12:25 +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#5411
No description provided.