[GH-ISSUE #5368] Native mods: conditional data files, loaded only when their conditions hold #1651

Closed
opened 2026-11-02 15:48:40 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @Qwerner88880 on GitHub.

🤖 Filed by Qwerner88880's AI agent (ZCode, GLM-5.3), not by Qwerner88880 personally.

Part of #4953's "More content registration" (conditional data) and #3911 (Mods). Suggested by the team alongside the ingredient types above: packs of recipes that use both fail to load today.

NeoForge's data conditions let a data file say "only load me when…": a mod is loaded (mod_loaded), a flag is set, an item exists. Modpacks' recipe overrides and add-ons use it heavily — data/mymod/recipe/…json with a neoforge:conditions block, and conditional entries inside tag and datapack files. Horizon's loaders don't read the block, so a file that has one either loads unconditionally (wrong) or fails (worse).

What I plan to scope out first, then implement:

  • Where the gate belongs: the recipe loaders (crafting.rs, the stations) first, then the other data files the mods index reads, one loader per PR if that keeps them small.
  • The condition shapes to support at first: mod_loaded (a named mod in horizon-mods.txt), not, and/or, and flag_exists/item_exists as the NeoForge set mods actually use.
  • The failure mode: an unsatisfied condition skips the file silently, as NeoForge does — not an error, not a warning per file (a warning per pack, at most).

Not in this: the launcher-side condition UI, and conditions in files the game doesn't read at all yet.

Originally created by @Qwerner88880 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5368 Originally assigned to: @Qwerner88880 on GitHub. > 🤖 Filed by Qwerner88880's AI agent (ZCode, GLM-5.3), not by Qwerner88880 personally. Part of #4953's "More content registration" (conditional data) and #3911 (Mods). Suggested by the team alongside the ingredient types above: packs of recipes that use both fail to load today. NeoForge's data conditions let a data file say "only load me when…": a mod is loaded (`mod_loaded`), a flag is set, an item exists. Modpacks' recipe overrides and add-ons use it heavily — `data/mymod/recipe/…json` with a `neoforge:conditions` block, and `conditional` entries inside tag and datapack files. Horizon's loaders don't read the block, so a file that has one either loads unconditionally (wrong) or fails (worse). What I plan to scope out first, then implement: - Where the gate belongs: the recipe loaders (`crafting.rs`, the stations) first, then the other data files the mods index reads, one loader per PR if that keeps them small. - The condition shapes to support at first: `mod_loaded` (a named mod in `horizon-mods.txt`), `not`, `and`/`or`, and `flag_exists`/`item_exists` as the NeoForge set mods actually use. - The failure mode: an unsatisfied condition skips the file silently, as NeoForge does — not an error, not a warning per file (a warning per pack, at most). Not in this: the launcher-side condition UI, and conditions in files the game doesn't read at all yet.
Author
Owner

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

🤖 Agent: /claim

<!-- gh-comment-id:6547356552 --> @Qwerner88880 commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Author
Owner

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

🤖 Agent: PR #5439 — the gate, the four loaders, and the live run; tags, loot tables and advancements left to follow-ups as scoped.

<!-- gh-comment-id:6548226189 --> @Qwerner88880 commented on GitHub (Oct 31, 2026): 🤖 Agent: PR #5439 — the gate, the four loaders, and the live run; tags, loot tables and advancements left to follow-ups as scoped.
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#1651
No description provided.