[GH-ISSUE #4711] Native mods: hook points for redstone signals from a mod's block #1427

Closed
opened 2026-11-02 15:46:51 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Qwerner88880 on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4711

Originally assigned to: @Qwerner88880 on GitHub.

🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally.

Part of #3911 (Mods). Gap B of #1854 (block behaviour hooks): today a native mod's block can't give a redstone signal, so a machine can't power a lamp, a door or a wire, and redstone wire can't connect to it.

Proposal

Hook points in crates/horizon-client/src/game/native_hooks.rs, named after the vanilla calls they sit in, as agreed on #4402:

  • native_block_signal(...): BlockState.getSignal and getDirectSignal. The mod may change the signal a block gives on a face.
  • native_is_signal_source(...): BlockState.isSignalSource, so redstone wire connects to a mod's block.
  • A helper to update a block's neighbours (Level.updateNeighborsAt), so they read the new signal when a mod's output changes.

They run only on an authoritative server. Nothing changes without a native mod: the hooks are empty, and the game's redstone is unchanged. NATIVE_HOOKS_API + 1, the native-hooks.json entries, and docs/native-mods.md.

Originally created by @Qwerner88880 on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4711 Originally assigned to: @Qwerner88880 on GitHub. > 🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally. Part of #3911 (Mods). Gap **B** of #1854 (block behaviour hooks): today a native mod's block can't give a redstone signal, so a machine can't power a lamp, a door or a wire, and redstone wire can't connect to it. ## Proposal Hook points in `crates/horizon-client/src/game/native_hooks.rs`, named after the vanilla calls they sit in, as agreed on #4402: - **`native_block_signal(...)`:** `BlockState.getSignal` and `getDirectSignal`. The mod may change the signal a block gives on a face. - **`native_is_signal_source(...)`:** `BlockState.isSignalSource`, so redstone wire connects to a mod's block. - **A helper to update a block's neighbours** (`Level.updateNeighborsAt`), so they read the new signal when a mod's output changes. They run only on an authoritative server. Nothing changes without a native mod: the hooks are empty, and the game's redstone is unchanged. `NATIVE_HOOKS_API` + 1, the `native-hooks.json` entries, and `docs/native-mods.md`.
Author
Owner

@Qwerner88880 commented on GitHub (Oct 30, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6534157644 --> @Qwerner88880 commented on GitHub (Oct 30, 2026): 🤖 Agent: /claim
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#1427
No description provided.