[PR #1427] [MERGED] Particles from a server: /particle and explosions reach its players #3516

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

📋 Pull Request Information

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

Base: main ← Head: fix/st-particles


📝 Commits (8)

  • c35ea95 Server's mobs: babies, wool, collars, fire, slime sizes and health reach its clients
  • 0d8249e Leads: a server's clients draw the rope (ClientboundSetEntityLinkPacket)
  • c5fe5d4 Thrown potions and eyes of ender fly on a server's clients
  • 13772b4 Level events on a server's clients: spawner bursts, bone meal sparks, waxing
  • f88fba8 A server's attribute updates reach its player; new boss bars start visible
  • b7f4cba A server's scoreboard reaches its players: sidebar, teams, scores
  • 4aa1f8e World border on a server's clients: its state, its walls, its damage
  • 4b8fecf Particles from a server: /particle and explosions reach its players

📊 Changes

37 files changed (+2165 additions, -148 deletions)

View changed files

📝 crates/horizon-client/examples/lan_flat.rs (+1 -0)
📝 crates/horizon-client/examples/scene_collision_probe.rs (+1 -0)
📝 crates/horizon-client/src/bossbar.rs (+1 -1)
📝 crates/horizon-client/src/collisions.rs (+13 -2)
📝 crates/horizon-client/src/entity_nbt.rs (+44 -3)
📝 crates/horizon-client/src/game.rs (+57 -37)
📝 crates/horizon-client/src/game/commands/terrain_cmds.rs (+24 -14)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+63 -13)
📝 crates/horizon-client/src/game/control.rs (+12 -0)
📝 crates/horizon-client/src/game/creatures.rs (+4 -0)
📝 crates/horizon-client/src/game/dragon.rs (+2 -0)
📝 crates/horizon-client/src/game/end.rs (+51 -0)
📝 crates/horizon-client/src/game/explosion.rs (+1 -0)
📝 crates/horizon-client/src/game/lan.rs (+62 -13)
📝 crates/horizon-client/src/game/lan_actions.rs (+3 -1)
📝 crates/horizon-client/src/game/lan_entities.rs (+24 -0)
➕ crates/horizon-client/src/game/lan_particles.rs (+228 -0)
📝 crates/horizon-client/src/game/level_particles.rs (+63 -4)
📝 crates/horizon-client/src/game/potions.rs (+70 -8)
📝 crates/horizon-client/src/game/remote.rs (+72 -28)

...and 17 more files

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

A server never sent particles:

  • /particle on single player's server thread drew into the server's own engine;
  • TNT exploded without its burst for anyone but an old-mode host.

The protocol gains ClientboundLevelParticlesPacket and ClientboundExplodePacket; both codecs were checked with javap against the 26.3 client jar.

  • /particle sends to each viewer in range. With no viewers given, it sends to every player, as PlayerList.getPlayers does.
  • An explosion sends its packet to the players within 64 blocks.
  • Clients draw both as handleParticleEvent and handleExplosion do.

/particle's spread was measured from the command's source as if it were a position. It is now the spread as given (Vec3Argument.getVec3).

Stacked: builds on #1426 (fix/st-border). Review the last commit(s) only; the earlier ones are the PRs below it in the chain. Merge order: #1421 → #1422 → #1423 → #1424 → #1425 → #1426 → #1427.

Fixes #1392
Fixes #1394
Fixes #1405

Why

Since #1265, single player's window is a remote client of its own server thread, as a LAN guest's is. Whatever the server doesn't send, single player no longer shows. This PR is part of the bugs-st-1 batch: visuals and entity data on the server thread.

How tested

New lan_e2e check particles, run in both modes.

  • The host and the guest each run /particle for @s; only they must see it. They then run it for everyone; both sides must see it.
  • A TNT then explodes; both sides must see its emitter.
  • this branch, server thread: PASS, {'host @s': {'own': 60, 'other': 0}, 'host all': {'own dust': 10, 'other dust': 10}, 'guest …': same, 'blast': {'own explosion_emitter': 1, 'other explosion_emitter': 1}}.
  • this branch, old mode: PASS, except a guest's /particle for everyone, which doesn't reach the host. In old mode a guest's command has no way to reach the host's players (the same limitation as @a). The check skips that one sub-assert in old mode, and it is listed in FEATURES LATER.
  • main has no per-type particle counter, so the check needs this branch.

Every check was run through tools/lan_e2e.py (--server-thread and old mode) on the Mac mini, from the top of the chain (fix/st-particles), which contains this PR.

Self-check, run once on the top of the chain:

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at e325fa658, 4 min 27 s)

Check Result
Scope ⚠️ 37 files, +2165 −148; 2310 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 293 run, FAILED (errors=2) (20 s)
rustfmt ✅ (4 s)
clippy ✅ (13 s)
tests: horizon-client, horizon-protocol ✅ 1238 passed (3 min 39 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 ➖ 103 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 91 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Notes on the block:

  • Python tests: the 2 errors also happen on origin/main on this Mac, so they are not from this chain.
    • test_parity_runner: java exits 127 in the test's sandbox.
    • test_rust_parity: /private/var vs /var in relative_to.
  • Parity: the 103 affected harnesses ran in full at the top of the chain before a final rework of the entity defaults. 102 passed and server_entities failed. After the rework, server_entities was rerun and passes. Since then the chain has changed only one lan_e2e cleanup line (Python).

Needs Ludovic

Nothing beyond review. Merge in the chain order above. Each later PR's diff shrinks to its own commit once the earlier PRs are merged.

🤖 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/1427 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/st-particles` --- ### 📝 Commits (8) - [`c35ea95`](https://github.com/horizon-rust/horizon/commit/c35ea9568f4771e360cf353df64034237612daef) Server's mobs: babies, wool, collars, fire, slime sizes and health reach its clients - [`0d8249e`](https://github.com/horizon-rust/horizon/commit/0d8249e124ad6e3d945730d7e5ddf18b5507bec8) Leads: a server's clients draw the rope (ClientboundSetEntityLinkPacket) - [`c5fe5d4`](https://github.com/horizon-rust/horizon/commit/c5fe5d4bcf3331164d7a7ade1f5ac7cff2481aa6) Thrown potions and eyes of ender fly on a server's clients - [`13772b4`](https://github.com/horizon-rust/horizon/commit/13772b4e5bbc153f2ea896f44543dd75002e7b69) Level events on a server's clients: spawner bursts, bone meal sparks, waxing - [`f88fba8`](https://github.com/horizon-rust/horizon/commit/f88fba8d05616d9cc5265c3420726630d544302d) A server's attribute updates reach its player; new boss bars start visible - [`b7f4cba`](https://github.com/horizon-rust/horizon/commit/b7f4cba355f6cc18d6611b8f8eca8a987987f2fa) A server's scoreboard reaches its players: sidebar, teams, scores - [`4aa1f8e`](https://github.com/horizon-rust/horizon/commit/4aa1f8e14ab8957fdb1608d0eeffb3ca1db88e5e) World border on a server's clients: its state, its walls, its damage - [`4b8fecf`](https://github.com/horizon-rust/horizon/commit/4b8fecfe58c2544a57dd9af14e73821ae0abbe80) Particles from a server: /particle and explosions reach its players ### 📊 Changes **37 files changed** (+2165 additions, -148 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/lan_flat.rs` (+1 -0) 📝 `crates/horizon-client/examples/scene_collision_probe.rs` (+1 -0) 📝 `crates/horizon-client/src/bossbar.rs` (+1 -1) 📝 `crates/horizon-client/src/collisions.rs` (+13 -2) 📝 `crates/horizon-client/src/entity_nbt.rs` (+44 -3) 📝 `crates/horizon-client/src/game.rs` (+57 -37) 📝 `crates/horizon-client/src/game/commands/terrain_cmds.rs` (+24 -14) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+63 -13) 📝 `crates/horizon-client/src/game/control.rs` (+12 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+4 -0) 📝 `crates/horizon-client/src/game/dragon.rs` (+2 -0) 📝 `crates/horizon-client/src/game/end.rs` (+51 -0) 📝 `crates/horizon-client/src/game/explosion.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+62 -13) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+3 -1) 📝 `crates/horizon-client/src/game/lan_entities.rs` (+24 -0) ➕ `crates/horizon-client/src/game/lan_particles.rs` (+228 -0) 📝 `crates/horizon-client/src/game/level_particles.rs` (+63 -4) 📝 `crates/horizon-client/src/game/potions.rs` (+70 -8) 📝 `crates/horizon-client/src/game/remote.rs` (+72 -28) _...and 17 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What A server never sent particles: - `/particle` on single player's server thread drew into the server's own engine; - TNT exploded without its burst for anyone but an old-mode host. The protocol gains `ClientboundLevelParticlesPacket` and `ClientboundExplodePacket`; both codecs were checked with javap against the 26.3 client jar. - `/particle` sends to each viewer in range. With no viewers given, it sends to every player, as `PlayerList.getPlayers` does. - An explosion sends its packet to the players within 64 blocks. - Clients draw both as `handleParticleEvent` and `handleExplosion` do. `/particle`'s spread was measured from the command's source as if it were a position. It is now the spread as given (`Vec3Argument.getVec3`). **Stacked:** builds on #1426 (`fix/st-border`). Review the last commit(s) only; the earlier ones are the PRs below it in the chain. Merge order: #1421 → #1422 → #1423 → #1424 → #1425 → #1426 → #1427. Fixes #1392 Fixes #1394 Fixes #1405 ## Why Since #1265, single player's window is a remote client of its own server thread, as a LAN guest's is. Whatever the server doesn't send, single player no longer shows. This PR is part of the bugs-st-1 batch: visuals and entity data on the server thread. ## How tested New lan_e2e check `particles`, run in both modes. - The host and the guest each run `/particle` for `@s`; only they must see it. They then run it for everyone; both sides must see it. - A TNT then explodes; both sides must see its emitter. - this branch, server thread: PASS, `{'host @s': {'own': 60, 'other': 0}, 'host all': {'own dust': 10, 'other dust': 10}, 'guest …': same, 'blast': {'own explosion_emitter': 1, 'other explosion_emitter': 1}}`. - this branch, old mode: PASS, except a guest's `/particle` for everyone, which doesn't reach the host. In old mode a guest's command has no way to reach the host's players (the same limitation as `@a`). The check skips that one sub-assert in old mode, and it is listed in FEATURES LATER. - main has no per-type particle counter, so the check needs this branch. Every check was run through `tools/lan_e2e.py` (`--server-thread` and old mode) on the Mac mini, from the top of the chain (`fix/st-particles`), which contains this PR. Self-check, run once on the top of the chain: **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at e325fa658, 4 min 27 s) | Check | Result | | --- | --- | | Scope | ⚠️ 37 files, +2165 −148; 2310 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 293 run, FAILED (errors=2) (20 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (13 s) | | tests: horizon-client, horizon-protocol | ✅ 1238 passed (3 min 39 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 | ➖ 103 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 91 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Notes on the block: - **Python tests:** the 2 errors also happen on origin/main on this Mac, so they are not from this chain. - `test_parity_runner`: `java` exits 127 in the test's sandbox. - `test_rust_parity`: `/private/var` vs `/var` in `relative_to`. - **Parity:** the 103 affected harnesses ran in full at the top of the chain before a final rework of the entity defaults. 102 passed and `server_entities` failed. After the rework, `server_entities` was rerun and passes. Since then the chain has changed only one lan_e2e cleanup line (Python). ## Needs Ludovic Nothing beyond review. Merge in the chain order above. Each later PR's diff shrinks to its own commit once the earlier PRs are merged. 🤖 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 04:10:05 +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#3516
No description provided.