[PR #2048] [MERGED] Fix warden sonic boom waves for connected players #3964

Closed
opened 2026-11-03 04:13:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2048
Author: @rdbtCVS
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/1490-sonic-boom-delivery


📝 Commits (2)

  • b6af258 Fix warden sonic boom particle delivery to connected players
  • f19390b Sonic boom: take the LAN host in the same let-else as the particle

📊 Changes

3 files changed (+81 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+3 -0)
📝 crates/horizon-client/src/game/lan_particles.rs (+27 -0)
📝 tools/lan_e2e.py (+51 -0)

📄 Description

🤖 Opened by rdbt’s AI agent (Codex, GPT-6.1 Sol), not by rdbt himself.

What and why

Fixes #1490. Warden sonic-boom ray points were rendered only in the server's local particle engine, leaving the default single-player client without a visible wave. Send those points through the existing LevelParticles packet path to placed players in the same dimension, using vanilla's strict 32-block check against each player's block centre. Keep the existing local rendering once and the exact ray positions, count-zero stationary semantics, damage, knockback, timing and simulation RNG unchanged.

Adds tools/lan_e2e.py --check sonic, also run with --server-thread: a stationary, provoked warden behind a wall deals 20→10 health damage; the victim and nearby observer each create exactly 15 sonic-boom particles, while an observer 80 blocks away creates zero. Both modes pass.

Vanilla reference

Pinned Minecraft Java 26.3 SonicBoom.tick / lambda$tick$2 (read with javap -c -p against the pinned server-game.jar; REA exposes the tick wrapper without its lambda body), and ServerLevel.sendParticles(ServerPlayer, boolean, double, double, double, Packet) (REA overload 8). The latter filters by dimension and player block-centre distance. The existing count-zero event has the same single stationary particle result as vanilla's count-one/zero-spread packet.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 301b006ef, 2 min 56 s)

Check Result
Scope ✅ 3 files, +82 −0
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 305 passed (31 s)
rustfmt ✅ (7 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 1297 passed (2 min 5 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 29 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, lore_tooltip, mace, online_mode and 17 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Focused checks (all exit 0):

  • cargo build --locked --profile fast -p horizon-client --bins
  • python3 /tmp/1490-run.py --bin-dir target/fast --check sonic --out "$PWD/.local/1490-in-frame-final"
  • python3 /tmp/1490-run.py --bin-dir target/fast --check sonic --server-thread --out "$PWD/.local/1490-threaded-final"

The temporary driver invokes the committed LAN harness with an existing X11 display and --offscreen, replacing this machine's unavailable vscreen helper. Every game uses fresh isolated game, launcher and XDG homes, no audio and no launcher self-update. Broad parity is deferred to CI as requested.

Screenshots

Captured and visually inspected the threaded client's cyan sonic wave in .local/1490-threaded-host/host-sonic-near.png; final captures are under .local/1490-{in-frame,threaded}-final/. These local artifacts are not committed or hosted; the issue contains the before report. The harness additionally verifies actual client particle creation rather than server-only events.

🤖 Generated with Codex.


🔄 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/2048 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/1490-sonic-boom-delivery` --- ### 📝 Commits (2) - [`b6af258`](https://github.com/horizon-rust/horizon/commit/b6af2584659fd487757a67084883073058b334b7) Fix warden sonic boom particle delivery to connected players - [`f19390b`](https://github.com/horizon-rust/horizon/commit/f19390bae1a1d5461e117e3b3c0bb6752dcf7d20) Sonic boom: take the LAN host in the same let-else as the particle ### 📊 Changes **3 files changed** (+81 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -0) 📝 `crates/horizon-client/src/game/lan_particles.rs` (+27 -0) 📝 `tools/lan_e2e.py` (+51 -0) </details> ### 📄 Description > 🤖 Opened by rdbt’s AI agent (Codex, GPT-6.1 Sol), not by rdbt himself. ## What and why Fixes #1490. Warden sonic-boom ray points were rendered only in the server's local particle engine, leaving the default single-player client without a visible wave. Send those points through the existing LevelParticles packet path to placed players in the same dimension, using vanilla's strict 32-block check against each player's block centre. Keep the existing local rendering once and the exact ray positions, count-zero stationary semantics, damage, knockback, timing and simulation RNG unchanged. Adds `tools/lan_e2e.py --check sonic`, also run with `--server-thread`: a stationary, provoked warden behind a wall deals 20→10 health damage; the victim and nearby observer each create exactly 15 sonic-boom particles, while an observer 80 blocks away creates zero. Both modes pass. ## Vanilla reference Pinned Minecraft Java 26.3 `SonicBoom.tick` / `lambda$tick$2` (read with `javap -c -p` against the pinned server-game.jar; REA exposes the tick wrapper without its lambda body), and `ServerLevel.sendParticles(ServerPlayer, boolean, double, double, double, Packet)` (REA overload 8). The latter filters by dimension and player block-centre distance. The existing count-zero event has the same single stationary particle result as vanilla's count-one/zero-spread packet. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 301b006ef, 2 min 56 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +82 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 305 passed (31 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 1297 passed (2 min 5 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 29 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, hardcore_respawn, locator_bar, lore_tooltip, mace, online_mode and 17 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Focused checks (all exit 0): - `cargo build --locked --profile fast -p horizon-client --bins` - `python3 /tmp/1490-run.py --bin-dir target/fast --check sonic --out "$PWD/.local/1490-in-frame-final"` - `python3 /tmp/1490-run.py --bin-dir target/fast --check sonic --server-thread --out "$PWD/.local/1490-threaded-final"` The temporary driver invokes the committed LAN harness with an existing X11 display and `--offscreen`, replacing this machine's unavailable `vscreen` helper. Every game uses fresh isolated game, launcher and XDG homes, no audio and no launcher self-update. Broad parity is deferred to CI as requested. ## Screenshots Captured and visually inspected the threaded client's cyan sonic wave in `.local/1490-threaded-host/host-sonic-near.png`; final captures are under `.local/1490-{in-frame,threaded}-final/`. These local artifacts are not committed or hosted; the issue contains the before report. The harness additionally verifies actual client particle creation rather than server-only events. 🤖 Generated with [Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:37 +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#3964
No description provided.