[GH-ISSUE #5451] Native mods: a mod's own loot functions and conditions, beside vanilla's #1682

Closed
opened 2026-11-02 15:48:53 +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/5451

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" and #3911 (Mods); offered by Isloka beside the recipe work.

Vanilla's loot system is fully data-driven — loot tables, item modifiers (functions), and predicates, each with a registry of kinds that mods extend on NeoForge. Horizon reads vanilla's set (LootData, the loot module's tables, conditions and functions); a mod's loot table that names its own function kind or condition kind either fails the table's load or silently drops the entry, so chests come out empty or short and mob drops misbehave — exactly what a modpack's loot rebalance leans on.

What I plan to scope out first, then implement:

  • Where the loot loaders parse kinds today (horizon-world's loot.rs, load_kind/load_dir, the condition and function dispatches), so a mod's kind slots into the same switches.
  • The declaration shape: the container-registry precedent — the bundle answers for its own kind (function or condition), the loader keeps vanilla's, an unknown kind fails the entry as today.
  • What the hook hands the function: the loot context (the killer, the tool, the origin, the random) and its own JSON — vanilla's apply is the reference for what's reachable.

Not in this: the enchantment and consume-effect items beside this one, and the loot table format itself (vanilla's, already read).

Originally created by @Qwerner88880 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5451 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" and #3911 (Mods); offered by Isloka beside the recipe work. Vanilla's loot system is fully data-driven — loot tables, item modifiers (functions), and predicates, each with a registry of kinds that mods extend on NeoForge. Horizon reads vanilla's set (`LootData`, the `loot` module's tables, conditions and functions); a mod's loot table that names its own function kind or condition kind either fails the table's load or silently drops the entry, so chests come out empty or short and mob drops misbehave — exactly what a modpack's loot rebalance leans on. What I plan to scope out first, then implement: - Where the loot loaders parse kinds today (`horizon-world`'s `loot.rs`, `load_kind`/`load_dir`, the condition and function dispatches), so a mod's kind slots into the same switches. - The declaration shape: the container-registry precedent — the bundle answers for its own kind (function or condition), the loader keeps vanilla's, an unknown kind fails the entry as today. - What the hook hands the function: the loot context (the killer, the tool, the origin, the random) and its own JSON — vanilla's `apply` is the reference for what's reachable. Not in this: the enchantment and consume-effect items beside this one, and the loot *table* format itself (vanilla's, already read).
Author
Owner

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

🤖 Agent: /claim

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

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

🤖 Agent: PR #6142 — both hooks, the context (entity/damage/player/tool/block/luck/biome/seed), and the items engine's condition hook; verified live with exact counts and items on the ground.

<!-- gh-comment-id:6561344372 --> @Qwerner88880 commented on GitHub (Nov 1, 2026): 🤖 Agent: PR #6142 — both hooks, the context (entity/damage/player/tool/block/luck/biome/seed), and the items engine's condition hook; verified live with exact counts and items on the ground.
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#1682
No description provided.