[PR #96] [MERGED] Particles: 29 missing vanilla particle types (part of #63) #2324

Closed
opened 2026-11-02 15:54:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/particles-63-missing-types


📝 Commits (1)

  • efa2f0e Particles: 29 missing vanilla particle types

📊 Changes

8 files changed (+599 additions, -22 deletions)

View changed files

📝 crates/horizon-client/examples/particle_providers_probe.rs (+20 -4)
📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+24 -1)
➕ crates/horizon-client/src/game/item_particles.rs (+35 -0)
📝 crates/horizon-client/src/game/render_control.rs (+13 -1)
📝 crates/horizon-client/src/particles.rs (+491 -12)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaParticleProvidersOracle.java (+1 -0)
📝 tools/test_particle_providers_parity.py (+14 -4)

📄 Description

Builds on #89 (merged): its per-particle random streams and the particle_providers harness.

What was wrong

Vanilla 26.3 registers 128 particle types; Horizon's engine knew 91 (#63: "a lot of particles don't seem to be imported"). This PR adds 29 of the missing types, each built the way its vanilla provider builds it:

types vanilla class
sweep_attack AttackSweepParticle: xAux sets the size; full bright; 4-tick animation
glow, wax_on, wax_off, electric_spark, scrape GlowParticle and its five providers: colours, speed factors, provider-drawn lifetimes, age-based block-light emission
squid_ink, glow_squid_ink SquidInkParticle (a SimpleAnimatedParticle; sinks while in air)
item, item_slime, item_snowball, item_cobweb, sulfur_cube_goo BreakingItemParticle: a quarter of the ground-model particle sprite, in full colour; the layer comes from ItemStackRenderState.pickParticleMaterial
flash FireworkParticles.OverlayParticle: 7.1·Mth.sin pulse, alpha fades at extract. Firework explosions now spawn it, as FireworkParticles.Starter does
firefly FireflyParticle: provider-drawn motion and lifetime, fades in and out, light that fades too, wanders, removed inside blocks
trial_spawner_detection, trial_spawner_detection_ominous TrialSpawnerDetectionParticle
trial_omen, raid_omen SpellParticle.Provider
ominous_spawning FlyStraightTowardsParticle: colour lerped like ARGB.srgbLerp, scaled by the level random
spit, fishing, dust_plume SpitParticle, WakeParticle, DustPlumeParticle
red_poplar_leaves, orange_poplar_leaves, yellow_poplar_leaves FallingLeavesParticle.PoplarProvider
pause_mob_growth, reset_mob_growth SimpleVerticalParticle
block_marker BlockMarker

Also:

  • ParticleType.getOverrideLimiter now matches ParticleTypes.register(name, true). gust, sonic_boom, sculk_charge, sculk_charge_pop, campfire_*_smoke and vault_connection were missing from it, so they disappeared beyond 32 blocks.
  • /particle accepts the new types. item resolves the stack's ground model; item_slime, item_snowball and item_cobweb resolve the slime ball, snowball and cobweb models once (game/item_particles.rs).

How it's tested

The particle_providers harness from #89 now covers all 120 types Horizon implements: 1,428 cases, each built through the real registered provider and ticked for up to 80 ticks. Item providers get a stand-in ItemModelResolver that gives one layer per item.

python3 tools/test_particle_providers_parity.py
1,428 particle cases match the pinned client (46,848 output lines, 21 within the libm tolerance)

cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked pass (Mac mini), and tools/check_public_tree.py passes.

Not in this PR

  • elder_guardian: a model particle drawn with the guardian model.
  • sulfur_bubbles, noxious_gas, noxious_gas_cloud, geyser, geyser_base, geyser_plume, geyser_poof: their emitters, potent sulfur and its block entity, aren't in Horizon yet.
  • vibration through its provider: Horizon creates it directly with ParticleEngine::vibration.
  • TrialSpawnerDetectionParticle's LOOKAT_Y facing: Horizon draws every particle facing the camera on all axes.
  • Most emitters of these types (sweep attacks, waxing and scraping level events, snowball and egg breaks, squid ink, slime landings, eating) come in a follow-up PR.

Part of #63

🤖 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/96 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/particles-63-missing-types` --- ### 📝 Commits (1) - [`efa2f0e`](https://github.com/horizon-rust/horizon/commit/efa2f0e3be5e4b9d8f29b91ed82830e74774fa47) Particles: 29 missing vanilla particle types ### 📊 Changes **8 files changed** (+599 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/particle_providers_probe.rs` (+20 -4) 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+24 -1) ➕ `crates/horizon-client/src/game/item_particles.rs` (+35 -0) 📝 `crates/horizon-client/src/game/render_control.rs` (+13 -1) 📝 `crates/horizon-client/src/particles.rs` (+491 -12) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaParticleProvidersOracle.java` (+1 -0) 📝 `tools/test_particle_providers_parity.py` (+14 -4) </details> ### 📄 Description Builds on #89 (merged): its per-particle random streams and the `particle_providers` harness. ## What was wrong Vanilla 26.3 registers 128 particle types; Horizon's engine knew 91 (#63: "a lot of particles don't seem to be imported"). This PR adds 29 of the missing types, each built the way its vanilla provider builds it: | types | vanilla class | |---|---| | `sweep_attack` | `AttackSweepParticle`: `xAux` sets the size; full bright; 4-tick animation | | `glow`, `wax_on`, `wax_off`, `electric_spark`, `scrape` | `GlowParticle` and its five providers: colours, speed factors, provider-drawn lifetimes, age-based block-light emission | | `squid_ink`, `glow_squid_ink` | `SquidInkParticle` (a `SimpleAnimatedParticle`; sinks while in air) | | `item`, `item_slime`, `item_snowball`, `item_cobweb`, `sulfur_cube_goo` | `BreakingItemParticle`: a quarter of the ground-model particle sprite, in full colour; the layer comes from `ItemStackRenderState.pickParticleMaterial` | | `flash` | `FireworkParticles.OverlayParticle`: `7.1·Mth.sin` pulse, alpha fades at extract. Firework explosions now spawn it, as `FireworkParticles.Starter` does | | `firefly` | `FireflyParticle`: provider-drawn motion and lifetime, fades in and out, light that fades too, wanders, removed inside blocks | | `trial_spawner_detection`, `trial_spawner_detection_ominous` | `TrialSpawnerDetectionParticle` | | `trial_omen`, `raid_omen` | `SpellParticle.Provider` | | `ominous_spawning` | `FlyStraightTowardsParticle`: colour lerped like `ARGB.srgbLerp`, scaled by the level random | | `spit`, `fishing`, `dust_plume` | `SpitParticle`, `WakeParticle`, `DustPlumeParticle` | | `red_poplar_leaves`, `orange_poplar_leaves`, `yellow_poplar_leaves` | `FallingLeavesParticle.PoplarProvider` | | `pause_mob_growth`, `reset_mob_growth` | `SimpleVerticalParticle` | | `block_marker` | `BlockMarker` | Also: - `ParticleType.getOverrideLimiter` now matches `ParticleTypes.register(name, true)`. `gust`, `sonic_boom`, `sculk_charge`, `sculk_charge_pop`, `campfire_*_smoke` and `vault_connection` were missing from it, so they disappeared beyond 32 blocks. - `/particle` accepts the new types. `item` resolves the stack's ground model; `item_slime`, `item_snowball` and `item_cobweb` resolve the slime ball, snowball and cobweb models once (`game/item_particles.rs`). ## How it's tested The `particle_providers` harness from #89 now covers all 120 types Horizon implements: 1,428 cases, each built through the real registered provider and ticked for up to 80 ticks. Item providers get a stand-in `ItemModelResolver` that gives one layer per item. ``` python3 tools/test_particle_providers_parity.py 1,428 particle cases match the pinned client (46,848 output lines, 21 within the libm tolerance) ``` `cargo clippy --workspace --all-targets --locked -- -D warnings` and `cargo test --workspace --locked` pass (Mac mini), and `tools/check_public_tree.py` passes. ## Not in this PR - `elder_guardian`: a model particle drawn with the guardian model. - `sulfur_bubbles`, `noxious_gas`, `noxious_gas_cloud`, `geyser`, `geyser_base`, `geyser_plume`, `geyser_poof`: their emitters, potent sulfur and its block entity, aren't in Horizon yet. - `vibration` through its provider: Horizon creates it directly with `ParticleEngine::vibration`. - `TrialSpawnerDetectionParticle`'s `LOOKAT_Y` facing: Horizon draws every particle facing the camera on all axes. - Most emitters of these types (sweep attacks, waxing and scraping level events, snowball and egg breaks, squid ink, slime landings, eating) come in a follow-up PR. Part of #63 🤖 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-02 15:54:57 +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#2324
No description provided.