[GH-ISSUE #5449] Native mods: a mod's own enchantment effect kinds, beside vanilla's #1678

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/5449

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 enchantments are data files whose effects name typed effects (damage, tick, post_attack, hit_block, attributes, equipment_drops, location_changed, ammo_used, projectile_spawned, after_hit): Horizon runs the vanilla set, and a mod's enchantment JSON that names its own effect kind fails the enchantment's load — the whole enchantment is dead on arrival, the book and the table never see it. Tech mods hang their machines' behaviour on custom enchantment effects (energy efficiency tiers, tool upgrades), so this is the registry line their gear stops at.

What I plan to scope out first, then implement:

  • Where enchantment files load and which of vanilla's effect kinds the game dispatches today, so the mod's kind slots into the same switch — and what context each hook point of the set has (the attacker, the victim, the tool, the level), since an effect's behaviour needs the event it fires on.
  • The declaration shape: the container-registry precedent again — the bundle answers for its own kind, the loader keeps vanilla's, an unknown kind fails the enchantment as today rather than half-loading it.
  • Whether the first cut carries all of vanilla's firing points or the ones mods actually use (damage and tick first, the event-shaped ones after), said plainly in the PR.

Not in this: the enchantment definition file format itself (vanilla's, already read) and consume effects (the item beside this one).

Originally created by @Qwerner88880 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5449 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 enchantments are data files whose `effects` name typed effects (`damage`, `tick`, `post_attack`, `hit_block`, `attributes`, `equipment_drops`, `location_changed`, `ammo_used`, `projectile_spawned`, `after_hit`): Horizon runs the vanilla set, and a mod's enchantment JSON that names its own effect kind fails the enchantment's load — the whole enchantment is dead on arrival, the book and the table never see it. Tech mods hang their machines' behaviour on custom enchantment effects (energy efficiency tiers, tool upgrades), so this is the registry line their gear stops at. What I plan to scope out first, then implement: - Where enchantment files load and which of vanilla's effect kinds the game dispatches today, so the mod's kind slots into the same switch — and what context each hook point of the set has (the attacker, the victim, the tool, the level), since an effect's behaviour needs the event it fires on. - The declaration shape: the container-registry precedent again — the bundle answers for its own kind, the loader keeps vanilla's, an unknown kind fails the enchantment as today rather than half-loading it. - Whether the first cut carries all of vanilla's firing points or the ones mods actually use (damage and tick first, the event-shaped ones after), said plainly in the PR. Not in this: the enchantment *definition* file format itself (vanilla's, already read) and consume effects (the item beside this one).
Author
Owner

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

🤖 Agent: /claim

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

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

🤖 Agent: PR #5566 — , the components first. The value-effect components and the remaining firing points follow under the same claim.

<!-- gh-comment-id:6550370121 --> @Qwerner88880 commented on GitHub (Oct 31, 2026): 🤖 Agent: PR #5566 — , the components first. The value-effect components and the remaining firing points follow under the same 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#1678
No description provided.