Canary

Canary

6M Downloads

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

TelepathicGrunt opened this issue ยท 1 comments

commented

I am the dev of Bumblezone and I received this crash report: TelepathicGrunt/Bumblezone#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::m_8086_(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::m_8086_(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.

public BlockPathTypes getBlockPathType(BlockGetter blockGetter, int x, int y, int z) {

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.

commented

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