isXander / AdaptiveTooltips

Highly configurable tooltip rendering so they always fit on the screen.
GNU Lesser General Public License v3.0
22 stars 12 forks source link

1.20.2: mouseMixin has the wrong return type #35

Open MeeniMc opened 1 year ago

MeeniMc commented 1 year ago

The following crash happens with Adaptive Tooltip on non-void return type in net/minecraft/class_312::method_1598(JDD)V in net/minecraft/class_312::trackMouseWheel [INJECT Applicator Phase -> adaptive-tooltips.mixins.json:MouseMixin

This may require that other mods are present and use contain "mixinextras", sinche this has an extra check com.llamalad7.mixinextras.injector.WrapWithConditionInjector.checkTargetIsLogicallyVoid(WrapWithConditionInjector.java:41)

---- Minecraft Crash Report ----
// This doesn't make any sense!
Time: 2023-10-10 08:48:49
Description: Initializing game
java.lang.RuntimeException: Mixin transformation of net.minecraft.class_312 failed
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
    at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at net.minecraft.class_310.<init>(class_310.java:507)
    at net.minecraft.client.main.Main.main(Main.java:214)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422)
    ... 12 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [adaptive-tooltips.mixins.json:MouseMixin from mod adaptive-tooltips] from phase [DEFAULT] in config [adaptive-tooltips.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:589)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379)
    ... 15 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @WrapWithCondition annotation is targeting an instruction with a non-void return type in net/minecraft/class_312::method_1598(JDD)V in net/minecraft/class_312::trackMouseWheel [INJECT Applicator Phase -> adaptive-tooltips.mixins.json:MouseMixin from mod adaptive-tooltips -> Apply Injections ->  -> Inject -> adaptive-tooltips.mixins.json:MouseMixin from mod adaptive-tooltips->@WrapWithCondition::trackMouseWheel(Lnet/minecraft/class_437;DDDDJDD)Z]
    at com.llamalad7.mixinextras.versions.MixinVersionImpl_v0_8_4.makeInvalidInjectionException(MixinVersionImpl_v0_8_4.java:14)
    at com.llamalad7.mixinextras.utils.CompatibilityHelper.makeInvalidInjectionException(CompatibilityHelper.java:17)
    at com.llamalad7.mixinextras.injector.WrapWithConditionInjector.checkTargetIsLogicallyVoid(WrapWithConditionInjector.java:41)
    at com.llamalad7.mixinextras.injector.WrapWithConditionInjector.inject(WrapWithConditionInjector.java:23)
    at org.spongepowered.asm.mixin.injection.code.Injector.inject(Injector.java:276)
    at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.inject(InjectionInfo.java:445)
    at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1377)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1062)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:402)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:327)
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
    ... 15 more
MeeniMc commented 1 year ago

mouse mixin now takes the horizontal and vertical displacement for the wheel motions (it used only vertical before), so that's presumably the root cause.

FounderHawk commented 5 months ago

Receiving this error as well trying to make a 1.20.2 installation.The error is caused by the @WrapWithCondition annotation targeting an instruction with a non-void return type in net/minecraft/class_312::method_1598(JDD)V in net/minecraft/class_312::trackMouseWheel. This is causing the Mixin transformation to fail. (AI)

Terraphice commented 1 month ago

+1