AbdElAziz333 / Canary

A performance mod designed to optimize Minecraft's general performance and unofficial fork of Lithium mod for Minecraft Forge.
https://www.curseforge.com/minecraft/mc-mods/canary
GNU Lesser General Public License v3.0
41 stars 3 forks source link

[1.19.2 Forge] Crash with Bumblezone due to Canary Overwrite mixin #151

Closed TelepathicGrunt closed 1 year ago

TelepathicGrunt commented 1 year ago

I am the dev of Bumblezone and I received this crash report: https://github.com/TelepathicGrunt/Bumblezone/issues/250

Upon investigating the log provided, the crash appears to be a mixin conflict between our two mods:

[24May2023 22:21:21.388] [Server thread/FATAL] [mixin/]: Mixin apply failed the_bumblezone.mixins.json:entities.FlyNodeEvaluatorMixin -> net.minecraft.world.level.pathfinder.FlyNodeEvaluator: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException @At("INVOKE") on net/minecraft/world/level/pathfinder/FlyNodeEvaluator::thebumblezone_bzStringCurtainBlockingBees with priority 1000 cannot inject into net/minecraft/world/level/pathfinder/FlyNodeEvaluator::m8086(Lnet/minecraft/world/level/BlockGetter;III)Lnet/minecraft/world/level/pathfinder/BlockPathTypes; merged by com.abdelaziz.canary.mixin.calc.if_else.ai.evaluator.FlyNodeEvaluatorMixin with priority 1000 [PREINJECT Applicator Phase -> the_bumblezone.mixins.json:entities.FlyNodeEvaluatorMixin -> Prepare Injections -> -> wrapOperation$zoa001$thebumblezone_bzStringCurtainBlockingBees(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lcom/llamalad7/mixinextras/injector/wrapoperation/Operation;)Lnet/minecraft/world/level/pathfinder/BlockPathTypes; -> Prepare] org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("INVOKE") on net/minecraft/world/level/pathfinder/FlyNodeEvaluator::thebumblezone_bzStringCurtainBlockingBees with priority 1000 cannot inject into net/minecraft/world/level/pathfinder/FlyNodeEvaluator::m8086(Lnet/minecraft/world/level/BlockGetter;III)Lnet/minecraft/world/level/pathfinder/BlockPathTypes; merged by com.abdelaziz.canary.mixin.calc.if_else.ai.evaluator.FlyNodeEvaluatorMixin with priority 1000 [PREINJECT Applicator Phase -> the_bumblezone.mixins.json:entities.FlyNodeEvaluatorMixin -> Prepare Injections -> -> wrapOperation$zoa001$thebumblezone_bzStringCurtainBlockingBees(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lcom/llamalad7/mixinextras/injector/wrapoperation/Operation;)Lnet/minecraft/world/level/pathfinder/BlockPathTypes; -> Prepare]

My mixin is using a WrapOperation mixin from MixinExtras. My goal was to wrap getBlockPathTypeRaw so I can have Bees and other flying mobs not pathfind through my special String Curtain block. I chose this WrapOperation mixin to be as compatible as I could with other mods. No Redirect. No Overwrite. And should be stackable with other people also WrapOperationing on the same piece of code https://github.com/TelepathicGrunt/Bumblezone/blob/1.19.2-Forge/src/main/java/com/telepathicgrunt/the_bumblezone/mixin/entities/FlyNodeEvaluatorMixin.java

Issue is Canary overwrites this entire method and broke my mixin out of nowhere. https://github.com/AbdElAziz333/Canary/blob/0a496981c68265ed02c8bd3bbacb7db95c2663d4/src/main/java/com/abdelaziz/canary/mixin/calc/if_else/ai/evaluator/FlyNodeEvaluatorMixin.java#L20

There is nothing I can do to get around your overwrite mixin. Please revise this mixin and switch to something more mod compat friendly for people like me trying to get flying mobs to not pathfind though our blocks but allow ground mobs to pathfind just fine through said block.

AbdElAziz333 commented 1 year ago

Yes you are correct, this optimizations will cause many issues with many other mods, will fixed in the updated release.