[PR #7162] [MERGED] particles: queue explosion debris up to 512 per tick (fixes #4128) #7386

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7162
Author: @glitchsnake
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/4128-explosions-fps


📝 Commits (10+)

  • 982e38d explosion: optimize block destruction and particle tracking (fixes #4128)
  • cf8a1cd Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • a0d2dce Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • d84f286 Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • f2533d7 particles: queue explosion debris up to 512 per tick (fixes #4128)
  • 7c842b9 Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • 726f1b9 Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • 98f5199 Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • 072464b Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps
  • 7f5ff72 Explosion debris: draw the weighted pick every particle, drop the dead explosion_blocks

📊 Changes

3 files changed (+141 additions, -66 deletions)

View changed files

📝 crates/horizon-client-render/src/particles.rs (+138 -58)
📝 crates/horizon-client/src/game/lan_particles.rs (+2 -7)
📝 tools/port_map/client-001.tsv (+1 -1)

📄 Description

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

Fixes #4128.

What and why

Addressing review feedback on PR atomicity and vanilla parity:

  1. Reverted block update flags: Dropped custom deferred UPDATE_CLIENTS block clearing in crates/horizon-client/src/game/explosion.rs to preserve exact vanilla Java Edition 26.3 neighbor update ordering (UPDATE_ALL).
  2. Server-side sound decoupling: Decoupled server-side sound/packet logic to be submitted in its own isolated PR with lan_e2e test verification.
  3. ClientExplosionTracker debris queueing: Scoped PR strictly to client debris tracking (ClientExplosionTracker.track and tick). Debris particles from explosions are queued and emitted during tick capped at 512 total per tick across all explosions, weighted by each explosion's block count. Updated ledger mapping in tools/port_map/client-001.tsv.

Verification

  • Added invariant tests in crates/horizon-client-render/src/particles.rs:
    • explosion_tracker_caps_debris_at_512_across_multiple_explosions: verifies that two concurrent explosions (400 and 300 blocks) cap total particles at exactly 512.
    • explosion_tracker_emits_debris_only_in_air: verifies that particles are only spawned at positions where is_air is true.
    • explosion_tracker_tracks_and_ignores_zero_blocks: verifies that zero-block explosions are skipped.
  • Unit tests: cargo test -p horizon-client-render --lib particles (all 18 unit tests passed).
  • Public tree check: python3 tools/check_public_tree.py passed.
  • Merged latest origin/main.

🤖 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/7162 **Author:** [@glitchsnake](https://github.com/glitchsnake) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/4128-explosions-fps` --- ### 📝 Commits (10+) - [`982e38d`](https://github.com/horizon-rust/horizon/commit/982e38d8b91e481e247e5cd794557f5abd8d4856) explosion: optimize block destruction and particle tracking (fixes #4128) - [`cf8a1cd`](https://github.com/horizon-rust/horizon/commit/cf8a1cd029db3c011453201ebc2794654054e648) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`a0d2dce`](https://github.com/horizon-rust/horizon/commit/a0d2dce474398356d9f20a4be31c89dd9efc5160) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`d84f286`](https://github.com/horizon-rust/horizon/commit/d84f2864dcbcf9747dccf756cae649e5284cffa3) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`f2533d7`](https://github.com/horizon-rust/horizon/commit/f2533d796f86a26b67f967eec22c8678d23f0648) particles: queue explosion debris up to 512 per tick (fixes #4128) - [`7c842b9`](https://github.com/horizon-rust/horizon/commit/7c842b9356c1bb31b1ed5bc218e132ea46f3d560) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`726f1b9`](https://github.com/horizon-rust/horizon/commit/726f1b98e4d73b274b60ba6de60e454f8070b03b) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`98f5199`](https://github.com/horizon-rust/horizon/commit/98f51998975cb6f23d8717fb7afebb617879cd5a) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`072464b`](https://github.com/horizon-rust/horizon/commit/072464bf28f21ac6df298a7adf192d609ced2ee9) Merge remote-tracking branch 'origin/main' into perf/4128-explosions-fps - [`7f5ff72`](https://github.com/horizon-rust/horizon/commit/7f5ff72503c1d8451680de396c2df6fd056b4991) Explosion debris: draw the weighted pick every particle, drop the dead explosion_blocks ### 📊 Changes **3 files changed** (+141 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/particles.rs` (+138 -58) 📝 `crates/horizon-client/src/game/lan_particles.rs` (+2 -7) 📝 `tools/port_map/client-001.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally. Fixes #4128. ## What and why Addressing review feedback on PR atomicity and vanilla parity: 1. **Reverted block update flags:** Dropped custom deferred `UPDATE_CLIENTS` block clearing in `crates/horizon-client/src/game/explosion.rs` to preserve exact vanilla Java Edition 26.3 neighbor update ordering (`UPDATE_ALL`). 2. **Server-side sound decoupling:** Decoupled server-side sound/packet logic to be submitted in its own isolated PR with `lan_e2e` test verification. 3. **`ClientExplosionTracker` debris queueing:** Scoped PR strictly to client debris tracking (`ClientExplosionTracker.track` and `tick`). Debris particles from explosions are queued and emitted during `tick` capped at 512 total per tick across all explosions, weighted by each explosion's block count. Updated ledger mapping in `tools/port_map/client-001.tsv`. ## Verification - Added invariant tests in `crates/horizon-client-render/src/particles.rs`: - `explosion_tracker_caps_debris_at_512_across_multiple_explosions`: verifies that two concurrent explosions (400 and 300 blocks) cap total particles at exactly 512. - `explosion_tracker_emits_debris_only_in_air`: verifies that particles are only spawned at positions where `is_air` is true. - `explosion_tracker_tracks_and_ignores_zero_blocks`: verifies that zero-block explosions are skipped. - Unit tests: `cargo test -p horizon-client-render --lib particles` (all 18 unit tests passed). - Public tree check: `python3 tools/check_public_tree.py` passed. - Merged latest `origin/main`. 🤖 Generated with [Antigravity](https://antigravity.google.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:38:44 +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#7386
No description provided.