Majrusz / MajruszLibrary

Library with common code for my Minecraft modifications.
8 stars 6 forks source link

Incompatibility with SoulslikeWeaponry #55

Closed mariumbacchus closed 7 months ago

mariumbacchus commented 7 months ago

Hi, I've just got a bug report of a conflict issue between this mod and Soulslike Weaponry. It seems to be caused by us both trying to redirect the same method in both out EnchantmentHelperMixin classes which checks whether an enchantment should be applied or not to an item. I personally use it to check whether the bow should have my custom gun enchants or not.

Crash log: 2023-11-18-1.log Snippet of the issue: [22:02:03] [main/WARN]: @Redirect conflict. Skipping soulsweapons.mixins.json:EnchantmentHelperMixin from mod soulsweapons->@Redirect::isAcceptableItem(Lnet/minecraft/class_1886;Lnet/minecraft/class_1792;)Z with priority 1000, already redirected by mlib-fabric.mixins.json:MixinEnchantmentHelper from mod mlib->@Redirect::canEnchantUsingEnchantingTable(Lnet/minecraft/class_1886;Lnet/minecraft/class_1792;)Z with priority 1000

I've researched a tiny bit and saw something about mixin config plugins, but I haven't wrapped my head around it fully.

What do you think is the best approach?

Majrusz commented 7 months ago

Hello, thanks for the report, but at the moment I do not see any easy or proper way to fix it. I will take a look and try to remove @Redirect as probably similar issues will raise in the future with other mods

mariumbacchus commented 7 months ago

Sounds good, I'll see what I can do about removing @Redirect as well so something like this doesn't happen.

Majrusz commented 7 months ago

Okay, I fixed it with the latest 7.0.1 version https://github.com/Majrusz/MajruszLibrary/commit/ec11a061e1959d5821adc501a217649443a51d5b, thanks for the report once again!