[GH-ISSUE #5581] Native mods: contribute data pack files when the game loads or reloads its data #1739

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

Originally created by @Sylviromi on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5581

Originally assigned to: @Sylviromi on GitHub.

🤖 Filed by Sylviromi's AI agent (OpenCode, DeepSeek V4.1 Flash), not by Sylviromi personally.

A native mod can read the world's data but cannot add to the tables the game loads. API 41 lets a bundle ship and read its own data files (native_data!, native_built_data, native-data/<mod>/), but those files never take part in the data load: the tables — recipes, tags, loot — are built from content mods and world data packs only ("not in a native mod's own bundle", docs/native-mods.md, API 36). So a mod that computes recipes, tags or loot at run time — from its config, from the instance's folders, or from what it sees in the world — has nowhere to put the result: it needs a content mod beside it, or a data pack installed by hand.

Proposal: while the server assembles its data tables, ask every native mod for files — the same (path, bytes) the pack overlay carries — and merge them into the load, on first load and again on every /reload. The ask is the mod's chance to recompute. NeoForge counterpart: AddReloadListenerEvent. Side: server (the authoritative game builds the tables, the single player's integrated server included).

Where such files land in the pack order is part of the design; below the world's own data packs would keep a player's pack able to override them.

Use cases: a mod that turns its own config into recipes and tags; a pack-tuning mod; script-style pack logic (the roadmap's mod-languages item). Today the only route is shipping generated copies of every file, which /reload cannot refresh.

Originally created by @Sylviromi on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5581 Originally assigned to: @Sylviromi on GitHub. > 🤖 Filed by Sylviromi's AI agent (OpenCode, DeepSeek V4.1 Flash), not by Sylviromi personally. A native mod can read the world's data but cannot add to the tables the game loads. API 41 lets a bundle ship and read its own data files (`native_data!`, `native_built_data`, `native-data/<mod>/`), but those files never take part in the data load: the tables — recipes, tags, loot — are built from content mods and world data packs only ("not in a native mod's own bundle", docs/native-mods.md, API 36). So a mod that computes recipes, tags or loot at run time — from its config, from the instance's folders, or from what it sees in the world — has nowhere to put the result: it needs a content mod beside it, or a data pack installed by hand. Proposal: while the server assembles its data tables, ask every native mod for files — the same (path, bytes) the pack overlay carries — and merge them into the load, on first load and again on every `/reload`. The ask is the mod's chance to recompute. NeoForge counterpart: `AddReloadListenerEvent`. Side: server (the authoritative game builds the tables, the single player's integrated server included). Where such files land in the pack order is part of the design; below the world's own data packs would keep a player's pack able to override them. Use cases: a mod that turns its own config into recipes and tags; a pack-tuning mod; script-style pack logic (the roadmap's `mod-languages` item). Today the only route is shipping generated copies of every file, which `/reload` cannot refresh.
Author
Owner

@Sylviromi commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6550811906 --> @Sylviromi commented on GitHub (Oct 31, 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#1739
No description provided.