Hi all,
I have the following mixin:
@Mixin(EntityMooshroom.class)
public abstract class MixinEntityMooshroom extends EntityCow {
public MixinEntityMooshroom(World world) {
super(world);
}
@Inject(method = "processInteract", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/EntityMooshroom;setDead()V"))
//@Inject(method = "processInteract", at = @At("HEAD"))
public void onProcessInteract(EntityPlayer player, EnumHand hand, CallbackInfoReturnable<Boolean> ci) {
if (world.isRemote) {
EnchantmentCracker.toolDamageCheck(player.getHeldItem(hand), 1);
}
}
}
Inside the IDE, this mixin is applied without issues. For me, it also applies without issues outside the IDE, but multiple users have reported to me the following stacktrace:
[16:58:08] [main/FATAL]: Mixin apply failed mixins.enchantment_cracking.json:MixinEntityMooshroom -> zy: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException Conflicting synthetic bridge target method name in synthetic bridge method a(Lvb;)Lvb; Existing:c Incoming:b
org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: Conflicting synthetic bridge target method name in synthetic bridge method a(Lvb;)Lvb; Existing:c Incoming:b
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachUniqueMethod(MixinPreProcessorStandard.java:499) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:300) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:257) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:237) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1144) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:254) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353) ~[liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724) [liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703) [liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509) [liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72) [liteloader-1.12-SNAPSHOT.jar:1.12-SNAPSHOT+jnks-b9.git-4ca9c4eaf0528ac1e2967a31de7e0697700965cf]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) [launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [?:1.8.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:1.8.0_51]
at vg.c(SourceFile:293) [vg.class:?]
at ng.c(SourceFile:479) [ng.class:?]
at bhz.<init>(SourceFile:394) [bhz.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
The full mod source code is available at https://github.com/Earthcomputer/EnchantmentCracking
Any ideas as to what’s going on?
(As a side note, this mixin also fails alongside Forge, but that’s an unrelated issue and I know what the problem is)