[PR #4643] [MERGED] Arrows fly into whoever picks them up on servers and the server thread #5751

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4643
Author: @Joansitoh
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/arrow-pickup-animation


📝 Commits (1)

  • 3f38f88 Arrows fly into whoever picks them up on servers and the server thread (#4486)

📊 Changes

4 files changed (+71 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/control.rs (+2 -0)
📝 crates/horizon-client/src/game/pickups.rs (+11 -0)
📝 crates/horizon-client/src/game/remote.rs (+26 -10)
📝 tools/lan_e2e.py (+32 -0)

📄 Description

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

What and why

Fixes #4486.

When a player picks up an arrow (or trident) on a server, LAN guest's host or single player (server thread), the arrow vanished instead of flying into the player. The client's TakeItemEntity handler only started the pickup animation for dropped items and experience orbs; an arrow, kept in creatures.projectiles, was removed at once and its pickup sound was not played at it.

Now the handler looks the projectile up, plays the pickup sound at its position and adds the ItemPickupParticle (Taken::Arrow) toward the collector before removing it. The LAN guest path and the old in-frame path already did this; the in-frame path is untouched.

Also: horizon-ctl status gets pickups (pickup particles made so far, by item/orb/arrow), and tools/lan_e2e.py gets an arrow_pickup check that uses it (the particle lives 3 ticks, too short to poll for).

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

ClientPacketListener.handleTakeItemEntity (ItemPickupParticle for any taken entity, ITEM_PICKUP sound at the taken entity, then removal of non-item non-orb entities).

Harness: python3 tools/lan_e2e.py --check arrow_pickup (host on its server thread + guest). Each player picks up a summoned {pickup:1b} arrow; both clients must count one pickups.arrow and the inventory gains the arrow.

  • Without the remote.rs change: FAIL (flown: 0 on both clients, arrow picked up).
  • With it: PASS (flown: 1 on both clients, for the host's and the guest's pickup).

Self-check

pr_ready block (tools/pr_ready.py --base upstream/main, 90 min). The rustfmt failure it reported was fixed afterwards (cargo fmt --check clean, cargo check OK); the parity failures are an environment gap, see below.

Check Result
Scope ✅ 4 files, +63 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed
rustfmt ✅ after fix (first run ❌)
clippy ✅
tests: horizon-client ✅ 1064 passed
doc tests ✅
Parity ⚠️ 282 affected, 271 passed, failed: music, situational_music, sound_engine, sound_event, subtitle
Label none (fix)

The 5 parity failures are FileNotFoundError: .local/horizon-client/26.3/assets/minecraft/sounds.json: the author's shared vanilla data lacks that file, so they fail before running anything; this PR does not touch sounds.json or those modules. To be re-run by CI.

port_ledger.py check --base upstream/main: only "long uncited fns" notes for control_status and add_pickup_toward (existing fns, small additions).

🤖 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/4643 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/arrow-pickup-animation` --- ### 📝 Commits (1) - [`3f38f88`](https://github.com/horizon-rust/horizon/commit/3f38f88bee2d930b9ff9dd1695deed647277774f) Arrows fly into whoever picks them up on servers and the server thread (#4486) ### 📊 Changes **4 files changed** (+71 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/control.rs` (+2 -0) 📝 `crates/horizon-client/src/game/pickups.rs` (+11 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+26 -10) 📝 `tools/lan_e2e.py` (+32 -0) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Claude Opus 5.5), not by Joansitoh personally. ## What and why Fixes #4486. When a player picks up an arrow (or trident) on a server, LAN guest's host or single player (server thread), the arrow vanished instead of flying into the player. The client's `TakeItemEntity` handler only started the pickup animation for dropped items and experience orbs; an arrow, kept in `creatures.projectiles`, was removed at once and its pickup sound was not played at it. Now the handler looks the projectile up, plays the pickup sound at its position and adds the `ItemPickupParticle` (`Taken::Arrow`) toward the collector before removing it. The LAN guest path and the old in-frame path already did this; the in-frame path is untouched. Also: `horizon-ctl status` gets `pickups` (pickup particles made so far, by `item`/`orb`/`arrow`), and `tools/lan_e2e.py` gets an `arrow_pickup` check that uses it (the particle lives 3 ticks, too short to poll for). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `ClientPacketListener.handleTakeItemEntity` (`ItemPickupParticle` for any taken entity, `ITEM_PICKUP` sound at the taken entity, then removal of non-item non-orb entities). Harness: `python3 tools/lan_e2e.py --check arrow_pickup` (host on its server thread + guest). Each player picks up a summoned `{pickup:1b}` arrow; both clients must count one `pickups.arrow` and the inventory gains the arrow. - Without the `remote.rs` change: **FAIL** (`flown: 0` on both clients, arrow picked up). - With it: **PASS** (`flown: 1` on both clients, for the host's and the guest's pickup). ## Self-check pr_ready block (`tools/pr_ready.py --base upstream/main`, 90 min). The rustfmt failure it reported was fixed afterwards (`cargo fmt --check` clean, `cargo check` OK); the parity failures are an environment gap, see below. | Check | Result | | --- | --- | | Scope | ✅ 4 files, +63 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed | | rustfmt | ✅ after fix (first run ❌) | | clippy | ✅ | | tests: horizon-client | ✅ 1064 passed | | doc tests | ✅ | | Parity | ⚠️ 282 affected, 271 passed, failed: music, situational_music, sound_engine, sound_event, subtitle | | Label | none (fix) | The 5 parity failures are `FileNotFoundError: .local/horizon-client/26.3/assets/minecraft/sounds.json`: the author's shared vanilla data lacks that file, so they fail before running anything; this PR does not touch sounds.json or those modules. To be re-run by CI. `port_ledger.py check --base upstream/main`: only "long uncited fns" notes for `control_status` and `add_pickup_toward` (existing fns, small additions). 🤖 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:14:45 +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#5751
No description provided.