Spell Fix 1.1.2 (Fabric 1.21.1)
Curse Maven Snippet
What's new
Spell Fix 1.1.2
If you are on 1.1.0, please update. The spell-delivery fix announced in that release did not actually apply at runtime, so it fixed nothing. This release replaces it with an approach that is confirmed to engage, and logs a line for every handler it adapts so you can see it working.
Custom spell delivery
Spell Engine widened the caster parameter of SpellHandlers.CustomDelivery#onSpellDelivery from
PlayerEntity to LivingEntity, without leaving a default implementation. Handlers built
before that satisfy neither form, so casting one of their spells throws AbstractMethodError
inside the server tick loop — in single player that drops you out of the world, and on a
dedicated server it stops the server outright.
Spell Fix now substitutes an adapter at the moment each handler is registered. That also covers handlers which are lambdas, since those have no class file to patch but do still pass through registration. In an affected pack you will see lines like:
[Spell Fix] Adapted legacy custom delivery 'soulwarden:bind' from ... SpellsV2 (lambda)
Calls into changed methods
The same widening also breaks mods that call changed Spell Engine methods, which surfaces as
NoSuchMethodError instead. Both known cases are corrected to the current signatures:
- Basic Skill Sets —
SpellHelper.getRange(PlayerEntity, ...). This one runs on every world tick, so it appears as Exception ticking world rather than on cast. - Spellblade Next —
SpellHelper.deliver(..., PlayerEntity, ..., Consumer)in Spellstrike.
Covered
Effect renderers (client): Berserker, Forcemaster, Oathsworn Paladins, Witcher. Spell deliveries (server): Soulwarden — which bundles the Druids spells — Spellblade Next, Archers Expansion, Basic Skill Sets, Brimstone Battlemages.
Install on both sides: the renderer fixes are client-side, the delivery and call fixes are not. No dependency on Spell Engine or on any of the mods above, no config, no content, and inert unless an affected mod is installed.
This mod has no additional files