[PR #4390] [MERGED] Native mods: send vanilla particles from server code #5599

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4390
Author: @arismoko
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: native-vanilla-particles


📝 Commits (3)

  • 4783b8d Native mods: send vanilla particles from server code
  • 2070336 Merge remote-tracking branch 'hr/main' into fix/pr-4390
  • 00c9b04 Native particles: API 11

📊 Changes

6 files changed (+115 additions, -16 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+17 -2)
📝 crates/horizon-client/src/game/creatures.rs (+3 -1)
📝 crates/horizon-client/src/game/fishing.rs (+9 -1)
📝 crates/horizon-client/src/game/lan_particles.rs (+25 -11)
📝 crates/horizon-client/src/game/native_hooks.rs (+56 -1)
📝 docs/native-mods.md (+5 -0)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria.

Add GameLevel::native_send_particles for supported vanilla particles on an authoritative server. The helper queues a packet for nearby players in the originating level, even when the server is holding its host. It returns whether the request was accepted, not how many players received it.

Block particles carry a validated block state. Item particles remain unsupported: the existing server dispatch does not encode their item payload, and the client receiver does not draw it. Trail and vibration options are also unsupported. The count uses the signed network value without an added 4,096 limit; zero retains vanilla's directional particle behavior. The helper rejects non-finite values before packet conversion.

The counterpart is vanilla ServerLevel.sendParticles, which NeoForge's public particle documentation names for server code. This helper is API next; the API number is assigned at merge.

Fixes #4384.

Checks

  • Four native hook and catalog tests passed; scoped clippy passed.
  • A throwaway native mod emitted flame and block particles on the integrated server thread. Both clients' counters rose for both types.
  • The same mod emitted both types on a dedicated server. Its client's counters rose from 0 to 24 for each type.
  • In both game checks, the mod accepted a count of 4,097 and rejected missing block state, item particles, and non-finite positions.

🤖 Generated with Dyna


🔄 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/4390 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `native-vanilla-particles` --- ### 📝 Commits (3) - [`4783b8d`](https://github.com/horizon-rust/horizon/commit/4783b8d5522116374fb9373a917769d650dedaf0) Native mods: send vanilla particles from server code - [`2070336`](https://github.com/horizon-rust/horizon/commit/20703366f91b6726e20dc9d865c8d2093e7b6fba) Merge remote-tracking branch 'hr/main' into fix/pr-4390 - [`00c9b04`](https://github.com/horizon-rust/horizon/commit/00c9b04674bb40f608da5dbbf7382d16ba891e9e) Native particles: API 11 ### 📊 Changes **6 files changed** (+115 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+17 -2) 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -1) 📝 `crates/horizon-client/src/game/fishing.rs` (+9 -1) 📝 `crates/horizon-client/src/game/lan_particles.rs` (+25 -11) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+56 -1) 📝 `docs/native-mods.md` (+5 -0) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Add `GameLevel::native_send_particles` for supported vanilla particles on an authoritative server. The helper queues a packet for nearby players in the originating level, even when the server is holding its host. It returns whether the request was accepted, not how many players received it. Block particles carry a validated block state. Item particles remain unsupported: the existing server dispatch does not encode their item payload, and the client receiver does not draw it. Trail and vibration options are also unsupported. The count uses the signed network value without an added 4,096 limit; zero retains vanilla's directional particle behavior. The helper rejects non-finite values before packet conversion. The counterpart is vanilla `ServerLevel.sendParticles`, which [NeoForge's public particle documentation](https://docs.neoforged.net/docs/resources/client/particles/) names for server code. This helper is API next; the API number is assigned at merge. Fixes #4384. ### Checks - Four native hook and catalog tests passed; scoped clippy passed. - A throwaway native mod emitted flame and block particles on the integrated server thread. Both clients' counters rose for both types. - The same mod emitted both types on a dedicated server. Its client's counters rose from 0 to 24 for each type. - In both game checks, the mod accepted a count of 4,097 and rejected missing block state, item particles, and non-finite positions. 🤖 Generated with Dyna --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:40 +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#5599
No description provided.