[PR #6102] [MERGED] A player trampling turtle eggs plays their break sound and particles #6655

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

📋 Pull Request Information

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

Base: main ← Head: fix/5858-turtle-egg-trample


📝 Commits (1)

  • 19dfc97 A player trampling turtle eggs plays their break sound and particles

📊 Changes

3 files changed (+93 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+33 -1)
📝 crates/horizon-client/src/game/lan_actions.rs (+18 -0)
📝 crates/horizon-client/src/landing.rs (+42 -2)

📄 Description

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

What and why

Part of #5858: the second point, a player walking over turtle eggs. The eggs broke, but with no sound, particles or break animation.

TurtleEggBlock.decreaseEggs plays block.turtle_egg.break at the block (Level.playSound(null, pos, ..), heard by every player) and, while eggs remain, sends level event 2001 (the break particles and sound); the last egg goes through Level.destroyBlock(pos, false), which sends 2001 too. horizon-world's BlockLandingRegistry::destroy_egg already emits all of this through BlockLandingWorld, and the player's MotionWorld turns it into FallEvents, but the game dropped them:

  • FallEvent::Sound was only played when SceneSound::player_fall_sound named it, which is never the case for a block's own sound (SceneSound::Block);
  • FallEvent::LevelEvent fell into landing_block_updates, which ignored it;
  • FallEvent::Destroy only finished the neighbour updates, without destroyBlock's 2001.

Now:

  • SceneSound::block_sound names the sounds a block plays where it is (the turtle egg's break and the shelf mushroom's bounce, which went through the same path and was silent for the player too). They play at the block centre for the local player, and for a LAN guest they reach every player, the guest included (no excluded player, as in vanilla).
  • FallEvent::Destroy carries the destroyed state, and landing_block_updates sends its 2001 and forwards FallEvent::LevelEvent through level_event_at, which LAN guests receive as before.

The honey block's sounds go through entity_sound (Entity.playSound) and are unchanged. FallEvent::trace is unchanged, so the scene probe's output stays the same.

Not covered here (still open in #5858): particles when placing eggs near water, the anvil drop flung away, armor stands not breaking eggs.

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.world.level.block.TurtleEggBlock.stepOn, destroyEgg, decreaseEggs: the break sound at the block, then setBlock with one egg less, gameEvent, levelEvent(2001, pos, Block.getId(state)), or destroyBlock(pos, false) for the last egg.
  • net.minecraft.world.level.Level.destroyBlock: levelEvent(2001, ..) for any non-fire block.

The block-side behaviour is already checked by horizon-world's block landing fixture; this change is in the client's handling of the events it emits. Unit test: landing::tests::block_sounds_map_to_block_events.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-G0M27UC, against upstream/main at 6f30860d0, 6 min 43 s)

Check Result
Scope ✅ 3 files, +93 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 527 passed (1 min 59 s)
rustfmt ✅ (17 s)
clippy ✅ (1 min 50 s)
tests: horizon-client ✅ 1721 passed (2 min 30 s)
doc tests ✅ 0 passed (3 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/6102 **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/5858-turtle-egg-trample` --- ### 📝 Commits (1) - [`19dfc97`](https://github.com/horizon-rust/horizon/commit/19dfc97138cc88172a9a9b9a892b237df805e275) A player trampling turtle eggs plays their break sound and particles ### 📊 Changes **3 files changed** (+93 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+33 -1) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+18 -0) 📝 `crates/horizon-client/src/landing.rs` (+42 -2) </details> ### 📄 Description > 🤖 Opened by breachato's AI agent (Claude Code, Claude Opus 5.5), not by breachato personally. ## What and why Part of #5858: the second point, a player walking over turtle eggs. The eggs broke, but with no sound, particles or break animation. `TurtleEggBlock.decreaseEggs` plays `block.turtle_egg.break` at the block (`Level.playSound(null, pos, ..)`, heard by every player) and, while eggs remain, sends level event 2001 (the break particles and sound); the last egg goes through `Level.destroyBlock(pos, false)`, which sends 2001 too. `horizon-world`'s `BlockLandingRegistry::destroy_egg` already emits all of this through `BlockLandingWorld`, and the player's `MotionWorld` turns it into `FallEvent`s, but the game dropped them: - `FallEvent::Sound` was only played when `SceneSound::player_fall_sound` named it, which is never the case for a block's own sound (`SceneSound::Block`); - `FallEvent::LevelEvent` fell into `landing_block_updates`, which ignored it; - `FallEvent::Destroy` only finished the neighbour updates, without `destroyBlock`'s 2001. Now: - `SceneSound::block_sound` names the sounds a block plays where it is (the turtle egg's break and the shelf mushroom's bounce, which went through the same path and was silent for the player too). They play at the block centre for the local player, and for a LAN guest they reach every player, the guest included (no excluded player, as in vanilla). - `FallEvent::Destroy` carries the destroyed state, and `landing_block_updates` sends its 2001 and forwards `FallEvent::LevelEvent` through `level_event_at`, which LAN guests receive as before. The honey block's sounds go through `entity_sound` (`Entity.playSound`) and are unchanged. `FallEvent::trace` is unchanged, so the scene probe's output stays the same. Not covered here (still open in #5858): particles when placing eggs near water, the anvil drop flung away, armor stands not breaking eggs. ## 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.world.level.block.TurtleEggBlock.stepOn`, `destroyEgg`, `decreaseEggs`: the break sound at the block, then `setBlock` with one egg less, `gameEvent`, `levelEvent(2001, pos, Block.getId(state))`, or `destroyBlock(pos, false)` for the last egg. - `net.minecraft.world.level.Level.destroyBlock`: `levelEvent(2001, ..)` for any non-fire block. The block-side behaviour is already checked by `horizon-world`'s block landing fixture; this change is in the client's handling of the events it emits. Unit test: `landing::tests::block_sounds_map_to_block_events`. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-G0M27UC, against upstream/main at 6f30860d0, 6 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +93 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 527 passed (1 min 59 s) | | rustfmt | ✅ (17 s) | | clippy | ✅ (1 min 50 s) | | tests: horizon-client | ✅ 1721 passed (2 min 30 s) | | doc tests | ✅ 0 passed (3 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:26 +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#6655
No description provided.