[GH-ISSUE #5448] Native mods: a mod's own consume effects, beside vanilla's #1680

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

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 the team beside the recipe work (#5367, #5447).

Vanilla 26.3's consume_effect registry (ConsumeEffect: apply effects, remove, clear all, teleport randomly, play sound) is closed in Horizon today: a food or potion component that names a mod's own consume effect either fails the item's load or silently does nothing, and the mod has nowhere to declare one. Food is where mods put their twists — deduct health instead of adding, chance-based effects, custom sounds — so a consumables mod is stuck at the registry line.

What I plan to scope out first, then implement:

  • Where consume effects live today (horizon-world's consume_effect/consumable, the item components that reference them) and which of vanilla's five shapes the game already runs, so a mod's kind slots into the same dispatch.
  • The declaration shape a bundle gets — the container-registry precedent (native_block_entity_container, and the ingredient-hook follow-up in #5367) is the model: the bundle answers for its own kind, the loader keeps vanilla's.
  • What the hook hands the effect: the consuming player, the stack, and the effect's own JSON, with the vanilla effects' behavior as the reference for what's reachable.

Not in this: the potion/food component registration itself (a mod's own data component types are #4806), and the enchantment side (its own item beside this one).

Originally created by @Qwerner88880 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5448 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 the team beside the recipe work (#5367, #5447). Vanilla 26.3's `consume_effect` registry (`ConsumeEffect`: apply effects, remove, clear all, teleport randomly, play sound) is closed in Horizon today: a food or potion component that names a mod's own consume effect either fails the item's load or silently does nothing, and the mod has nowhere to declare one. Food is where mods put their twists — deduct health instead of adding, chance-based effects, custom sounds — so a consumables mod is stuck at the registry line. What I plan to scope out first, then implement: - Where consume effects live today (`horizon-world`'s `consume_effect`/`consumable`, the item components that reference them) and which of vanilla's five shapes the game already runs, so a mod's kind slots into the same dispatch. - The declaration shape a bundle gets — the container-registry precedent (`native_block_entity_container`, and the ingredient-hook follow-up in #5367) is the model: the bundle answers for its own kind, the loader keeps vanilla's. - What the hook hands the effect: the consuming player, the stack, and the effect's own JSON, with the vanilla effects' behavior as the reference for what's reachable. Not in this: the potion/food *component* registration itself (a mod's own data component types are #4806), and the enchantment side (its own item beside this one).
Author
Owner

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

🤖 Agent: /claim

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

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

🤖 Agent: PR #5558 — the hook, the parser normalisation, and the live run: hook fires once per item with the right kind and player; a bare vanilla name applies, only a namespaced kind outside minecraft's reaches the hook.

<!-- gh-comment-id:6550110217 --> @Qwerner88880 commented on GitHub (Oct 31, 2026): 🤖 Agent: PR #5558 — the hook, the parser normalisation, and the live run: hook fires once per item with the right kind and player; a bare vanilla name applies, only a namespaced kind outside minecraft's reaches the hook.
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#1680
No description provided.