[PR #4071] [CLOSED] Add native block entity draw hook #5398

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4071
Author: @arismoko
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: native-block-entity-render-prototype


📝 Commits (8)

  • 967ec25 Native mods: block entities for mod blocks (hook points API 3)
  • da98be3 Native mods: a save leaves out a mod block entity mid-tick
  • 52399eb Merge main into native-mod-block-entities: the hook catalog
  • 27c3c0b Native mods: the block entity hooks in the hook catalog
  • 8079010 Native mods: a mod block entity's tick marks its chunk changed
  • 2de673c Merge main; block entity hooks are API 4 (#3706 took 3)
  • 89046c8 Sync selected native block entity data to Horizon clients
  • 1aa3a1a Add native block entity draw hook

📊 Changes

20 files changed (+882 additions, -30 deletions)

View changed files

📝 crates/horizon-client-render/src/chunk/block_entity.rs (+10 -0)
📝 crates/horizon-client-render/src/containers.rs (+10 -5)
📝 crates/horizon-client/src/content_identity.rs (+27 -3)
📝 crates/horizon-client/src/game.rs (+40 -1)
📝 crates/horizon-client/src/game/block_entity_ticks.rs (+2 -0)
📝 crates/horizon-client/src/game/blockctl.rs (+2 -2)
📝 crates/horizon-client/src/game/commands.rs (+1 -1)
📝 crates/horizon-client/src/game/dispenser.rs (+2 -1)
📝 crates/horizon-client/src/game/lan.rs (+9 -0)
➕ crates/horizon-client/src/game/native_block_entity_render.rs (+194 -0)
📝 crates/horizon-client/src/game/native_hooks.rs (+106 -2)
📝 crates/horizon-client/src/game/remote.rs (+26 -2)
📝 crates/horizon-client/src/lan/chunks.rs (+142 -10)
📝 crates/horizon-client/src/lan/data.rs (+3 -1)
📝 crates/horizon-client/src/lan/hub.rs (+33 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
➕ crates/horizon-client/src/mod_block_entity_sync.rs (+162 -0)
📝 crates/horizon-client/src/save.rs (+60 -2)
📝 docs/native-mods.md (+22 -0)
📝 native-hooks.json (+30 -0)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Builds on #4066: review only the last commit.

Adds a native draw hook for visible client block entities. It provides the selected client tag, camera-relative origin, partial tick, game time, light and entity atlas sprites. The hook appends quads to the existing entity batch.

The entity atlas currently contains Minecraft textures only; mod-owned entity textures need separate work. This covers part of #4028.

Tests: draw-hook and hook catalog tests, and client test-target clippy. A synthetic native mixin rendered a quad on both the server-thread client and a LAN guest using synced client data.

🤖 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/4071 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `native-block-entity-render-prototype` --- ### 📝 Commits (8) - [`967ec25`](https://github.com/horizon-rust/horizon/commit/967ec25579028318059ed085799af03c4d862cce) Native mods: block entities for mod blocks (hook points API 3) - [`da98be3`](https://github.com/horizon-rust/horizon/commit/da98be3276e06d6395e64e18ec8a09c89e5494c1) Native mods: a save leaves out a mod block entity mid-tick - [`52399eb`](https://github.com/horizon-rust/horizon/commit/52399eb28afb34dc47b1e12d0f1d7b21060b8a6b) Merge main into native-mod-block-entities: the hook catalog - [`27c3c0b`](https://github.com/horizon-rust/horizon/commit/27c3c0be3111f77cc2bef6e3d0f9f5d66f26b165) Native mods: the block entity hooks in the hook catalog - [`8079010`](https://github.com/horizon-rust/horizon/commit/807901034b6f4c3fdc6053d0aab7c9b7943acb8a) Native mods: a mod block entity's tick marks its chunk changed - [`2de673c`](https://github.com/horizon-rust/horizon/commit/2de673c4f8a881c81052c60a503430e8c7f68055) Merge main; block entity hooks are API 4 (#3706 took 3) - [`89046c8`](https://github.com/horizon-rust/horizon/commit/89046c860c95225880ffc72060224a3e711e83dc) Sync selected native block entity data to Horizon clients - [`1aa3a1a`](https://github.com/horizon-rust/horizon/commit/1aa3a1aa126103c94663630b4aa39087906a1320) Add native block entity draw hook ### 📊 Changes **20 files changed** (+882 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/chunk/block_entity.rs` (+10 -0) 📝 `crates/horizon-client-render/src/containers.rs` (+10 -5) 📝 `crates/horizon-client/src/content_identity.rs` (+27 -3) 📝 `crates/horizon-client/src/game.rs` (+40 -1) 📝 `crates/horizon-client/src/game/block_entity_ticks.rs` (+2 -0) 📝 `crates/horizon-client/src/game/blockctl.rs` (+2 -2) 📝 `crates/horizon-client/src/game/commands.rs` (+1 -1) 📝 `crates/horizon-client/src/game/dispenser.rs` (+2 -1) 📝 `crates/horizon-client/src/game/lan.rs` (+9 -0) ➕ `crates/horizon-client/src/game/native_block_entity_render.rs` (+194 -0) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+106 -2) 📝 `crates/horizon-client/src/game/remote.rs` (+26 -2) 📝 `crates/horizon-client/src/lan/chunks.rs` (+142 -10) 📝 `crates/horizon-client/src/lan/data.rs` (+3 -1) 📝 `crates/horizon-client/src/lan/hub.rs` (+33 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) ➕ `crates/horizon-client/src/mod_block_entity_sync.rs` (+162 -0) 📝 `crates/horizon-client/src/save.rs` (+60 -2) 📝 `docs/native-mods.md` (+22 -0) 📝 `native-hooks.json` (+30 -0) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Builds on #4066: review only the last commit. Adds a native draw hook for visible client block entities. It provides the selected client tag, camera-relative origin, partial tick, game time, light and entity atlas sprites. The hook appends quads to the existing entity batch. The entity atlas currently contains Minecraft textures only; mod-owned entity textures need separate work. This covers part of #4028. Tests: draw-hook and hook catalog tests, and client test-target clippy. A synthetic native mixin rendered a quad on both the server-thread client and a LAN guest using synced client data. 🤖 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:12:19 +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#5398
No description provided.