Framework

Framework

20M Downloads

Mixin crash in dev environment

Entropy159 opened this issue ยท 1 comments

commented

I've opened an issue on the CGM page, but it seems to stem from this mod (and that issue has been inactive for over a year), so I'll try it here. I am trying to make an addon for CGM, but when I try and test it in IntelliJ (and previously Eclipse) I get a crash:

[08Oct2024 12:11:47.344] [pool-3-thread-1/FATAL] [mixin/]: Mixin apply failed cgm.mixins.json:common.LivingEntityMixin -> net.minecraft.world.entity.LivingEntity: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on capture could not find any targets matching 'Lnet/minecraft/world/entity/LivingEntity;m_6469_(Lnet/minecraft/world/damagesource/DamageSource;F)Z' in net.minecraft.world.entity.LivingEntity. Using refmap cgm.refmap.json [PREINJECT Applicator Phase -> cgm.mixins.json:common.LivingEntityMixin -> Prepare Injections ->  -> handler$zzb000$capture(Lnet/minecraft/world/damagesource/DamageSource;FLorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on capture could not find any targets matching 'Lnet/minecraft/world/entity/LivingEntity;m_6469_(Lnet/minecraft/world/damagesource/DamageSource;F)Z' in net.minecraft.world.entity.LivingEntity. Using refmap cgm.refmap.json [PREINJECT Applicator Phase -> cgm.mixins.json:common.LivingEntityMixin -> Prepare Injections ->  -> handler$zzb000$capture(Lnet/minecraft/world/damagesource/DamageSource;FLorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]

It seems to me that the mixins are not deobfuscated in the dev environment. Is there a way to fix this?

commented

In each of your runs in your build.gradle, add the below code and then regen your runs.

property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"