[PR #6344] [MERGED] Remote: handle arrow hit, pufferfish sting and limited crafting in GameEvent #6812

Closed
opened 2026-11-03 06:27:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6344
Author: @DmytroChup
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/remote-game-event-parity


📝 Commits (1)

  • f983b54 Remote: handle arrow hit, pufferfish sting and limited crafting in GameEvent

📊 Changes

2 files changed (+74 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+73 -0)
📝 tools/port_map/client-002.tsv (+1 -1)

📄 Description

🤖 Opened by DmytroChup's AI agent (Antigravity), not by DmytroChup personally.

What and why

Matches vanilla 26.3 ClientPacketListener.handleGameEvent in crates/horizon-client/src/game/remote.rs:

  • Event 6 (PLAY_ARROW_HIT_SOUND): plays entity.arrow.hit_player sound at the player's eye height (0.18, 0.45), matching vanilla playSound.
  • Event 9 (PUFFER_FISH_STING): plays entity.puffer_fish.sting sound at the player's position (1.0, 1.0).
  • Event 12 (LIMITED_CRAFTING): updates do_limited_crafting on Remote, mirroring vanilla LocalPlayer.setDoLimitedCrafting.
  • Updates tools/port_map/client-002.tsv to close the port gaps on ClientPacketListener.handleGameEvent.
  • Adds unit test game_event_constants_and_types_match_vanilla.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

net.minecraft.client.multiplayer.ClientPacketListener.handleGameEvent (client jar, lines 555–561) and net.minecraft.network.protocol.game.ClientboundGameEventPacket (event IDs 6, 9, 12).

Other projects' code

none

Self-check

Checked locally:

  • tools/port_ledger.py map-check tools/port_map/client-002.tsv: 147 rows, 0 problems
  • cargo fmt -p horizon-client --check: pass
  • cargo clippy --profile fast -p horizon-client --bin horizon-client: pass (0 warnings, 0 errors)
  • cargo test --profile fast -p horizon-client --bin horizon-client game::remote::tests: 20 passed, 0 failed

Remaining checks run in CI.

🤖 Generated with Antigravity


🔄 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/6344 **Author:** [@DmytroChup](https://github.com/DmytroChup) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/remote-game-event-parity` --- ### 📝 Commits (1) - [`f983b54`](https://github.com/horizon-rust/horizon/commit/f983b543ab46674d96f704b056439232f0516dc8) Remote: handle arrow hit, pufferfish sting and limited crafting in GameEvent ### 📊 Changes **2 files changed** (+74 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+73 -0) 📝 `tools/port_map/client-002.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by DmytroChup's AI agent (Antigravity), not by DmytroChup personally. ## What and why Matches vanilla 26.3 `ClientPacketListener.handleGameEvent` in `crates/horizon-client/src/game/remote.rs`: - Event 6 (`PLAY_ARROW_HIT_SOUND`): plays `entity.arrow.hit_player` sound at the player's eye height (`0.18`, `0.45`), matching vanilla `playSound`. - Event 9 (`PUFFER_FISH_STING`): plays `entity.puffer_fish.sting` sound at the player's position (`1.0`, `1.0`). - Event 12 (`LIMITED_CRAFTING`): updates `do_limited_crafting` on `Remote`, mirroring vanilla `LocalPlayer.setDoLimitedCrafting`. - Updates `tools/port_map/client-002.tsv` to close the port gaps on `ClientPacketListener.handleGameEvent`. - Adds unit test `game_event_constants_and_types_match_vanilla`. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `net.minecraft.client.multiplayer.ClientPacketListener.handleGameEvent` (client jar, lines 555–561) and `net.minecraft.network.protocol.game.ClientboundGameEventPacket` (event IDs 6, 9, 12). ## Other projects' code none ## Self-check Checked locally: - `tools/port_ledger.py map-check tools/port_map/client-002.tsv`: 147 rows, 0 problems - `cargo fmt -p horizon-client --check`: pass - `cargo clippy --profile fast -p horizon-client --bin horizon-client`: pass (0 warnings, 0 errors) - `cargo test --profile fast -p horizon-client --bin horizon-client game::remote::tests`: 20 passed, 0 failed Remaining checks run in CI. 🤖 Generated with [Antigravity](https://antigravity.google) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:27:25 +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#6812
No description provided.