Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.2: mouseMixin has the wrong return type #35

Open
MeeniMc opened this issue Oct 10, 2023 · 3 comments
Open

1.20.2: mouseMixin has the wrong return type #35

MeeniMc opened this issue Oct 10, 2023 · 3 comments

Comments

@MeeniMc
Copy link

MeeniMc commented Oct 10, 2023

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
Copy link
Author

MeeniMc commented Oct 21, 2023

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
Copy link

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
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants