[GH-ISSUE #6425] Using items on a server: the first-person hand does not swing #2086

Closed
opened 2026-11-02 15:51:57 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @oxi-does-dev on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6425

Originally assigned to: @oxi-does-dev on GitHub.

🤖 Filed by oxi-does-dev's AI agent (OpenCode, GLM 5.3), not by oxi-does-dev personally.

Throwing an ender pearl, a splash/lingering potion, an experience bottle, a wind charge or a snowball in multiplayer does not play the first-person swing; the hand only dips (the itemUsed equip displacement). In singleplayer the swing plays. Equipping armor from the hand on a server does not swing either.

Why: Game::remote_use_item (crates/horizon-client/src/game/remote.rs) sends the UseItem packet and runs the client's prediction, but never calls swing_arm. Vanilla's MultiPlayerGameMode.useItem runs ItemStack.use on the client and player.swing(hand) on a shouldSwing() result (InteractionResult.SUCCESS; CONSUME does not swing — a crossbow's use answers CONSUME, a trident's charge too).

The block-use path (useItemOn) already does this on a server (result.should_swing() → with_hand(hand, Game::swing_arm)), so only the Item.use half is missing.

Vanilla 26.3 references: Minecraft.startUseItem, MultiPlayerGameMode.useItem, ItemStack.use (SUCCESS answers of ThrowableItemProjectile/SplashPotionItem/SnowballItem/Equipable.swapWithEquipmentSlot/ItemUtils.startUsingInstantly), and CONSUME in CrossbowItem.use and TridentItem.use.

Originally created by @oxi-does-dev on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6425 Originally assigned to: @oxi-does-dev on GitHub. > 🤖 Filed by oxi-does-dev's AI agent (OpenCode, GLM 5.3), not by oxi-does-dev personally. Throwing an ender pearl, a splash/lingering potion, an experience bottle, a wind charge or a snowball in multiplayer does not play the first-person swing; the hand only dips (the `itemUsed` equip displacement). In singleplayer the swing plays. Equipping armor from the hand on a server does not swing either. **Why:** `Game::remote_use_item` (`crates/horizon-client/src/game/remote.rs`) sends the UseItem packet and runs the client's prediction, but never calls `swing_arm`. Vanilla's `MultiPlayerGameMode.useItem` runs `ItemStack.use` on the client and `player.swing(hand)` on a `shouldSwing()` result (`InteractionResult.SUCCESS`; `CONSUME` does not swing — a crossbow's use answers `CONSUME`, a trident's charge too). The block-use path (`useItemOn`) already does this on a server (`result.should_swing() → with_hand(hand, Game::swing_arm)`), so only the `Item.use` half is missing. Vanilla 26.3 references: `Minecraft.startUseItem`, `MultiPlayerGameMode.useItem`, `ItemStack.use` (SUCCESS answers of `ThrowableItemProjectile`/`SplashPotionItem`/`SnowballItem`/`Equipable.swapWithEquipmentSlot`/`ItemUtils.startUsingInstantly`), and `CONSUME` in `CrossbowItem.use` and `TridentItem.use`.
Author
Owner

@oxi-does-dev commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6563643041 --> @oxi-does-dev commented on GitHub (Nov 1, 2026): /claim
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#2086
No description provided.