[PR #3052] [MERGED] Drop the hand after placing a block or using an item on a server #4768

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

📋 Pull Request Information

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

Base: main ← Head: fix/hand-drops-after-use-on-server


📝 Commits (1)

  • e24394c Drop the hand after placing or using an item on a server

📊 Changes

1 file changed (+23 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+23 -2)

📄 Description

What and why

  • Reported on Discord with a side-by-side video: placing blocks in Horizon only plays the swing. In vanilla the held block also dips and comes back up after each placement.
  • Single player now runs on the server thread, so every world goes through remote_use in game/remote.rs. That path sent the packets and swung the arm but never called HandHeights::item_used (LocalPlayer.itemUsed), so the hand never dropped. The old in-frame path (use_with_hand) already did.
  • Now, as in Minecraft.startUseItem:
    • a block use that swung drops the hand when it spent the held item (the predicted placement consumes it) or the player has infinite materials (creative);
    • a successful Item.use (main or off hand) always drops it.

Vanilla reference

Minecraft.java:1799-1808 (useItemOn: swing, then itemUsed when the count changed or hasInfiniteMaterials), Minecraft.java:1822-1829 (useItem: itemUsed on success), FirstPersonHandsAndItems.itemUsed.

Self-check

fmt passes. Built and tested by this pull request's checks. Not run in game.


🔄 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/3052 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/hand-drops-after-use-on-server` --- ### 📝 Commits (1) - [`e24394c`](https://github.com/horizon-rust/horizon/commit/e24394ca3a79fd54b66b4327b0c814fba7d85b14) Drop the hand after placing or using an item on a server ### 📊 Changes **1 file changed** (+23 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+23 -2) </details> ### 📄 Description ## What and why - Reported on Discord with a side-by-side video: placing blocks in Horizon only plays the swing. In vanilla the held block also dips and comes back up after each placement. - Single player now runs on the server thread, so every world goes through `remote_use` in `game/remote.rs`. That path sent the packets and swung the arm but never called `HandHeights::item_used` (`LocalPlayer.itemUsed`), so the hand never dropped. The old in-frame path (`use_with_hand`) already did. - Now, as in `Minecraft.startUseItem`: - a block use that swung drops the hand when it spent the held item (the predicted placement consumes it) or the player has infinite materials (creative); - a successful `Item.use` (main or off hand) always drops it. ## Vanilla reference `Minecraft.java:1799-1808` (useItemOn: swing, then `itemUsed` when the count changed or `hasInfiniteMaterials`), `Minecraft.java:1822-1829` (useItem: `itemUsed` on success), `FirstPersonHandsAndItems.itemUsed`. ## Self-check fmt passes. Built and tested by this pull request's checks. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:47 +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#4768
No description provided.