[PR #6149] [MERGED] Taking an experience orb always plays its pickup sound, at the orb #6678

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

📋 Pull Request Information

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

Base: main ← Head: fix/6122-orb-pickup-sound


📝 Commits (1)

  • 841a0ad Taking an experience orb always plays its pickup sound, at the orb

📊 Changes

2 files changed (+32 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+13 -7)
📝 crates/horizon-client/src/game/remote.rs (+19 -5)

📄 Description

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

What and why

Fixes #6122.

Collecting a furnace's experience made no pickup sound.

In vanilla the server sends no sound for an orb: ExperienceOrb.playerTouch is Player.take, repairPlayerItems, giveExperiencePoints, with no playSound. The sound is the client's, in ClientPacketListener.handleTakeItemEntity: for an ExperienceOrb, playLocalSound(orb x/y/z, EXPERIENCE_ORB_PICKUP, PLAYERS, 0.1, (r - r) * 0.35 + 0.9), for every orb taken (26.3 bytecode).

Horizon had two gaps:

  • On a server (game/remote.rs, TakeItemEntity), the orb case was skipped on the assumption that the server sends the sound, so collecting experience was silent. It now plays the orb sound at the orb.
  • In a local world (Game orb pickup), the sound played once at the eyes, and only when points were left after mending, so a fully mended pickup was silent. Each orb taken now sounds at the orb, after mending (the server's half) as vanilla's order has it.

The LAN host already played it per orb at the orb for its guests (lan_actions.rs) and is unchanged.

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.handleTakeItemEntity: the ExperienceOrb branch's playLocalSound.
  • net.minecraft.world.entity.ExperienceOrb.playerTouch: no sound on the server.

Read with javap -c from the pinned 26.3 client jar. No harness or unit test: this is which sound plays where, not a value Horizon computes.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-G0M27UC, against upstream/main at abbfe4996, 9 min 49 s)

Check Result
Scope ✅ 2 files, +32 −12
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 584 passed (3 min 13 s)
rustfmt ✅ (15 s)
clippy ✅ (2 min 52 s)
tests: horizon-client ✅ 1767 passed (3 min 21 s)
doc tests ✅ 0 passed (4 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Not checked in game on this machine: the vanilla data isn't prepared here.

🤖 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/6149 **Author:** [@breachato](https://github.com/breachato) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6122-orb-pickup-sound` --- ### 📝 Commits (1) - [`841a0ad`](https://github.com/horizon-rust/horizon/commit/841a0adca02caccedf7d06c3d1e3cc2225449267) Taking an experience orb always plays its pickup sound, at the orb ### 📊 Changes **2 files changed** (+32 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+13 -7) 📝 `crates/horizon-client/src/game/remote.rs` (+19 -5) </details> ### 📄 Description > 🤖 Opened by breachato's AI agent (Claude Code, Claude Opus 5.5), not by breachato personally. ## What and why Fixes #6122. Collecting a furnace's experience made no pickup sound. In vanilla the server sends no sound for an orb: `ExperienceOrb.playerTouch` is `Player.take`, `repairPlayerItems`, `giveExperiencePoints`, with no `playSound`. The sound is the client's, in `ClientPacketListener.handleTakeItemEntity`: for an `ExperienceOrb`, `playLocalSound(orb x/y/z, EXPERIENCE_ORB_PICKUP, PLAYERS, 0.1, (r - r) * 0.35 + 0.9)`, for every orb taken (26.3 bytecode). Horizon had two gaps: - **On a server** (`game/remote.rs`, `TakeItemEntity`), the orb case was skipped on the assumption that the server sends the sound, so collecting experience was silent. It now plays the orb sound at the orb. - **In a local world** (`Game` orb pickup), the sound played once at the eyes, and only when points were left after mending, so a fully mended pickup was silent. Each orb taken now sounds at the orb, after mending (the server's half) as vanilla's order has it. The LAN host already played it per orb at the orb for its guests (`lan_actions.rs`) and is unchanged. ## 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.handleTakeItemEntity`: the `ExperienceOrb` branch's `playLocalSound`. - `net.minecraft.world.entity.ExperienceOrb.playerTouch`: no sound on the server. Read with `javap -c` from the pinned 26.3 client jar. No harness or unit test: this is which sound plays where, not a value Horizon computes. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-G0M27UC, against upstream/main at abbfe4996, 9 min 49 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +32 −12 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 584 passed (3 min 13 s) | | rustfmt | ✅ (15 s) | | clippy | ✅ (2 min 52 s) | | tests: horizon-client | ✅ 1767 passed (3 min 21 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Not checked in game on this machine: the vanilla data isn't prepared here. 🤖 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 06:24:49 +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#6678
No description provided.