[GH-ISSUE #4079] Bow and crossbow start the draw animation without arrows #1188

Closed
opened 2026-11-02 15:44:56 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @firisov on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4079

Originally assigned to: @sirrayi on GitHub.

Survival, singleplayer. With no arrows in the inventory the bow/crossbow still starts the draw animation and then stops. In vanilla 26.3 the animation doesn't start at all.

Originally created by @firisov on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4079 Originally assigned to: @sirrayi on GitHub. Survival, singleplayer. With no arrows in the inventory the bow/crossbow still starts the draw animation and then stops. In vanilla 26.3 the animation doesn't start at all.
bsakaguchi 2026-11-02 15:44:56 +07:00
Author
Owner

@DenisHumen commented on GitHub (Oct 29, 2026):

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

Taking this one: BowItem.use / CrossbowItem.use return FAIL without a projectile (unless the player has infinite materials) before startUsingItem, on the client too. Checking Horizon's client-side use path.

<!-- gh-comment-id:6511169194 --> @DenisHumen commented on GitHub (Oct 29, 2026): 🤖 Agent: comment by DenisHumen's AI agent (Claude Code, Opus 5.5), not by DenisHumen personally. Taking this one: `BowItem.use` / `CrossbowItem.use` return `FAIL` without a projectile (unless the player has infinite materials) before `startUsingItem`, on the client too. Checking Horizon's client-side use path.
Author
Owner

@sirrayi commented on GitHub (Oct 30, 2026):

/claim

<!-- gh-comment-id:6535209504 --> @sirrayi commented on GitHub (Oct 30, 2026): /claim
Author
Owner

@sirrayi commented on GitHub (Oct 31, 2026):

🤖 Agent: releasing my claim — this is already fixed on main, by 6297ea09f (2026-10-30 01:48 +0200, "BowItem.use and Crossbow.use FAIL with nothing to shoot"), which landed about seven minutes after the report. Nothing to do; it can be closed.

For the record, the current code does what the issue asks:

  • game/remote.rs remote_start_held_use starts the draw only when self.creative || self.projectile_slot(...).is_some() for a bow, and for a crossbow only when it is uncharged and has ammunition (a charged one returns early, CrossbowItem.use shooting it).
  • It now returns false for a bow or crossbow whose use FAILs, and the caller (remote_use's if !self.with_hand(hand, |g| g.remote_start_held_use(&held)) { return false; }) treats that as no success — so LocalPlayer.itemUsed never dips the hand and the click falls through to the other hand, which is exactly vanilla's InteractionResultHolder.fail path.

I had a patch that refactored that same decision into a weapon_use helper with a test; it added nothing to the behaviour, so it is dropped rather than sent.

<!-- gh-comment-id:6537211409 --> @sirrayi commented on GitHub (Oct 31, 2026): 🤖 Agent: releasing my claim — this is already fixed on main, by `6297ea09f` (2026-10-30 01:48 +0200, "BowItem.use and Crossbow.use FAIL with nothing to shoot"), which landed about seven minutes after the report. Nothing to do; it can be closed. For the record, the current code does what the issue asks: - `game/remote.rs` `remote_start_held_use` starts the draw only when `self.creative || self.projectile_slot(...).is_some()` for a bow, and for a crossbow only when it is uncharged *and* has ammunition (a charged one returns early, `CrossbowItem.use` shooting it). - It now returns `false` for a bow or crossbow whose use FAILs, and the caller (`remote_use`'s `if !self.with_hand(hand, |g| g.remote_start_held_use(&held)) { return false; }`) treats that as no success — so `LocalPlayer.itemUsed` never dips the hand and the click falls through to the other hand, which is exactly vanilla's `InteractionResultHolder.fail` path. I had a patch that refactored that same decision into a `weapon_use` helper with a test; it added nothing to the behaviour, so it is dropped rather than sent.
Author
Owner

@sirrayi commented on GitHub (Oct 31, 2026):

/unclaim

<!-- gh-comment-id:6537212282 --> @sirrayi commented on GitHub (Oct 31, 2026): /unclaim
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2026):

🤖 Claims: refused, This issue is closed. (asked by @sirrayi)

<!-- gh-comment-id:6537216795 --> @github-actions[bot] commented on GitHub (Oct 31, 2026): 🤖 Claims: refused, This issue is closed. (asked by @sirrayi)
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#1188
No description provided.