[PR #3981] [MERGED] Expose native server block change observations #5332

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

📋 Pull Request Information

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

Base: main ← Head: native-block-write-observation


📝 Commits (4)

  • 2a6ae51 Expose native server tick hooks
  • c2670e7 Expose read-only native server block queries
  • 907b572 Expose native neighbour-change observations
  • 05275d7 Expose native server block change observations

📊 Changes

11 files changed (+597 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+23 -0)
📝 crates/horizon-client/src/game/levels.rs (+16 -1)
📝 crates/horizon-client/src/game/native_hooks.rs (+78 -4)
📝 crates/horizon-client/src/game/native_lifecycle.rs (+178 -7)
➕ crates/horizon-client/src/game/native_world_read.rs (+115 -0)
📝 crates/horizon-world/src/level/hooks.rs (+2 -0)
📝 crates/horizon-world/src/level/mod.rs (+12 -0)
📝 crates/horizon-world/src/level/tests.rs (+141 -0)
📝 crates/horizon-world/src/level/update.rs (+1 -0)
📝 docs/native-mods.md (+16 -0)
📝 native-hooks.json (+15 -0)

📄 Description

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

Stacked on #3941 (and #3923 and #3878): review only the last commit. This observes committed Level.setBlock changes for #3980, without observing chunk loads.

Known gaps: direct writes bypass the hook, including furnace lit changes, some mob block changes, portal fills, anvil breakage and feature section writes.

Checks: level and client tests and clippy passed; a native mixin observed placement, removal and a no-op write on integrated and dedicated servers. An optimized no-mod simulation benchmark showed no measurable cost: median times for 1 million writes were 64.12 ms before and 59.67 ms after, with overlapping ranges.

🤖 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/3981 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `native-block-write-observation` --- ### 📝 Commits (4) - [`2a6ae51`](https://github.com/horizon-rust/horizon/commit/2a6ae514f85326d2dbbcbbee3b7a6a50333e5631) Expose native server tick hooks - [`c2670e7`](https://github.com/horizon-rust/horizon/commit/c2670e7bd2b9e74aae72823f1ecd24444b17b820) Expose read-only native server block queries - [`907b572`](https://github.com/horizon-rust/horizon/commit/907b5729b1f64d1bba9d63f55dafb6dec4ab101f) Expose native neighbour-change observations - [`05275d7`](https://github.com/horizon-rust/horizon/commit/05275d7682582acf6d28a568f19d2d0bc40f9548) Expose native server block change observations ### 📊 Changes **11 files changed** (+597 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+23 -0) 📝 `crates/horizon-client/src/game/levels.rs` (+16 -1) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+78 -4) 📝 `crates/horizon-client/src/game/native_lifecycle.rs` (+178 -7) ➕ `crates/horizon-client/src/game/native_world_read.rs` (+115 -0) 📝 `crates/horizon-world/src/level/hooks.rs` (+2 -0) 📝 `crates/horizon-world/src/level/mod.rs` (+12 -0) 📝 `crates/horizon-world/src/level/tests.rs` (+141 -0) 📝 `crates/horizon-world/src/level/update.rs` (+1 -0) 📝 `docs/native-mods.md` (+16 -0) 📝 `native-hooks.json` (+15 -0) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Stacked on #3941 (and #3923 and #3878): review only the last commit. This observes committed `Level.setBlock` changes for #3980, without observing chunk loads. Known gaps: direct writes bypass the hook, including furnace lit changes, some mob block changes, portal fills, anvil breakage and feature section writes. Checks: level and client tests and clippy passed; a native mixin observed placement, removal and a no-op write on integrated and dedicated servers. An optimized no-mod simulation benchmark showed no measurable cost: median times for 1 million writes were 64.12 ms before and 59.67 ms after, with overlapping ranges. 🤖 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:11:51 +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#5332
No description provided.