[PR #3303] [MERGED] Swing the arm when opening containers #4895

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

📋 Pull Request Information

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

Base: main ← Head: fix/container-use-swing


📝 Commits (2)

  • 1a9040a Swing the arm when opening containers
  • bc78cba Merge main into this branch

📊 Changes

5 files changed (+80 additions, -21 deletions)

View changed files

📝 crates/horizon-client/src/game/boats.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+32 -21)
📝 crates/horizon-world/src/level/data.rs (+1 -0)
📝 crates/horizon-world/src/level/interact.rs (+8 -0)
📝 crates/horizon-world/src/level/tests.rs (+38 -0)

📄 Description

What and why

Right-clicking storage (chest, barrel, furnace, hopper, shulker box, …) did not swing the arm. Vanilla MultiPlayerGameMode.useItemOn swings on InteractionResult.SUCCESS (SwingSource.CLIENT). Horizon's remote client only swung when the held item was a block, so an empty-hand container open never started the animation.

This predicts that client swing, and also swings when opening a chest boat.

Vanilla reference

  • MultiPlayerGameMode.useItemOn (SwingSource.CLIENT on SUCCESS)
  • ChestBlock.useWithoutItem / other container useWithoutItem (SUCCESS on the client)
  • ChestBoat.interact when opening the chest
  • JukeboxBlock.useWithoutItem when has_record
  • DecoratedPotBlock.useWithoutItem

Harness: none (first-person / MultiPlayerGameMode prediction). World-level use_without_item Success for these blocks is covered by using_storage_and_interactable_blocks_succeeds.

Self-check

Not run here (pr_ready.py needs the Rust toolchain on this machine). CI should run rustfmt/clippy/tests for horizon-client and horizon-world.


🔄 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/3303 **Author:** [@doodlyyousuf](https://github.com/doodlyyousuf) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/container-use-swing` --- ### 📝 Commits (2) - [`1a9040a`](https://github.com/horizon-rust/horizon/commit/1a9040ad796241c340794c41b8ffa29a52f9ca3f) Swing the arm when opening containers - [`bc78cba`](https://github.com/horizon-rust/horizon/commit/bc78cba5b9118e396117f65885d3d2ab71eaddea) Merge main into this branch ### 📊 Changes **5 files changed** (+80 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boats.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+32 -21) 📝 `crates/horizon-world/src/level/data.rs` (+1 -0) 📝 `crates/horizon-world/src/level/interact.rs` (+8 -0) 📝 `crates/horizon-world/src/level/tests.rs` (+38 -0) </details> ### 📄 Description ## What and why Right-clicking storage (chest, barrel, furnace, hopper, shulker box, …) did not swing the arm. Vanilla `MultiPlayerGameMode.useItemOn` swings on `InteractionResult.SUCCESS` (`SwingSource.CLIENT`). Horizon's remote client only swung when the held item was a block, so an empty-hand container open never started the animation. This predicts that client swing, and also swings when opening a chest boat. ## Vanilla reference - `MultiPlayerGameMode.useItemOn` (`SwingSource.CLIENT` on `SUCCESS`) - `ChestBlock.useWithoutItem` / other container `useWithoutItem` (`SUCCESS` on the client) - `ChestBoat.interact` when opening the chest - `JukeboxBlock.useWithoutItem` when `has_record` - `DecoratedPotBlock.useWithoutItem` Harness: none (first-person / `MultiPlayerGameMode` prediction). World-level `use_without_item` Success for these blocks is covered by `using_storage_and_interactable_blocks_succeeds`. ## Self-check Not run here (`pr_ready.py` needs the Rust toolchain on this machine). CI should run rustfmt/clippy/tests for `horizon-client` and `horizon-world`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:43 +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#4895
No description provided.