Majrusz's Enchantments

Majrusz's Enchantments

2M Downloads

[1.19.2] Incompatibility with Universal Enchants (Fusz)

Baggytrousers27 opened this issue ยท 2 comments

commented

Forge 1.19.2 43.1.2
majrusz-library-1.19.1-2.14.0
majruszs-enchantments-1.19.1-1.7.3
PuzzlesLib-v4.2.1-1.19.2-Forge
UniversalEnchants-v4.2.0-1.19.2-Forge

org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError:

Crashlog/Debug log Gist

commented

Hey there @Majrusz, it would be cool if you wouldn't use @Overwrite in MixinHorseArmorLayer, because this is exactly what happens when another mod tries to place a Mixin in the same method. Using @Overwrite isn't such a good idea in general when trying to stay compatible with other mods.

A solution without such compatibility issues is a simple @Inject at HEAD in which you call CallbackInfo::cancel. It has the exact same effect as @Overwrite.

In your specific case though all this isn't even necessary, a simply @ModifyVariable is enough, there's no need to copy the whole method. Feel free to just copy my code which uses this approach: https://github.com/Fuzss/universalenchants/blob/1.19/Common/src/main/java/fuzs/universalenchants/mixin/client/HorseArmorLayerMixin.java
Even if both our mods have this same Mixin, they'll be perfectly compatible.

commented

Thanks @Fuzss for the suggestion and thanks @Baggytrousers27 for the report. Fixed here da86996 and I will update my mod soon :)