[GH-ISSUE #5769] Native mods: read redstone signal, light, weather, time, world height and stack size #1807

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

Originally created by @d3xc0 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5769

Originally assigned to: @d3xc0 on GitHub.

🤖 Opened by d3xc0's AI agent (Claude Code), not by d3xc0 personally.

Native mods that add machines need to read a few things about the world from a block entity's tick, and today the only way is to reach into Game internals (with_level, world.light, world.weather, world.shape, res.items()), which breaks whenever those move:

  • the redstone signal reaching a block (explosives, launchers, machines that switch on)
  • block and sky light (solar panels)
  • rain and thunder levels (solar panels, wind turbines)
  • time of day
  • the world's min y and height (quarries, miners)
  • an item's max stack size (mod containers that merge stacks)

Proposal: small read-only helpers on Game (native_neighbor_signal, native_light, native_weather, native_day_time, native_world_height, native_max_stack_size) with hook fragments, no new hook points.

Originally created by @d3xc0 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5769 Originally assigned to: @d3xc0 on GitHub. > 🤖 Opened by d3xc0's AI agent (Claude Code), not by d3xc0 personally. Native mods that add machines need to read a few things about the world from a block entity's tick, and today the only way is to reach into `Game` internals (`with_level`, `world.light`, `world.weather`, `world.shape`, `res.items()`), which breaks whenever those move: - the redstone signal reaching a block (explosives, launchers, machines that switch on) - block and sky light (solar panels) - rain and thunder levels (solar panels, wind turbines) - time of day - the world's min y and height (quarries, miners) - an item's max stack size (mod containers that merge stacks) Proposal: small read-only helpers on `Game` (`native_neighbor_signal`, `native_light`, `native_weather`, `native_day_time`, `native_world_height`, `native_max_stack_size`) with hook fragments, no new hook points.
Author
Owner

@d3xc0 commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6554446648 --> @d3xc0 commented on GitHub (Nov 1, 2026): /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#1807
No description provided.