Pehkui

Pehkui

35M Downloads

[Bug]: 1.18.2 Mixin transformation failed

NotSoEpic opened this issue ยท 3 comments

commented

Minecraft version(s)

Other (specify below)

Minecraft version details

1.18.2

Mod loader

Fabric

Mod loader version

0.13.3

Fabric API version

0.47.10

In what environment did the problem occur?

Other (specify in "What went wrong?" section)

What went wrong? (Crash logs don't go here)

The game crashes at startup
Looking at the log I think the error is caused by sendMovementPacketsModifyMinVelocty in ClientPlayerEntityMixin

Full list of installed mods

NotEnoughCrashes - 4.1.4+1.18.1-fabric
Fabric Api - 0.47.10+1.18.2
Pehkui - 3.1.0+1.14.4-1.18.1

Did the problem cause the game to crash?

Yes. (paste crash report below)

Full crash report contents (if you experienced a crash)

Crash report output:

[18:20:15] [main/INFO]: Loading Minecraft 1.18.2 with Fabric Loader 0.13.3 [18:20:16] [main/INFO]: Loading 47 mods: - fabric 0.47.10+1.18.2 - fabric-api-base 0.4.3+d7c144a860 via fabric - fabric-api-lookup-api-v1 1.5.6+d7c144a860 via fabric - fabric-biome-api-v1 8.0.2+801ec85b60 via fabric - fabric-blockrenderlayer-v1 1.1.11+3ac43d9560 via fabric - fabric-command-api-v1 1.1.8+d7c144a860 via fabric - fabric-commands-v0 0.2.7+b4f4f6cd60 via fabric - fabric-containers-v0 0.1.20+d7c144a860 via fabric - fabric-content-registries-v0 3.0.1+d82b939260 via fabric - fabric-crash-report-info-v1 0.1.10+3ac43d9560 via fabric - fabric-dimensions-v1 2.1.16+2540745460 via fabric - fabric-entity-events-v1 1.4.7+d7c144a860 via fabric - fabric-events-interaction-v0 0.4.18+d7c144a860 via fabric - fabric-events-lifecycle-v0 0.2.12+d7c144a860 via fabric - fabric-game-rule-api-v1 1.0.12+d7c144a860 via fabric - fabric-item-api-v1 1.3.2+691a79b560 via fabric - fabric-item-groups-v0 0.3.9+3ac43d9560 via fabric - fabric-key-binding-api-v1 1.0.11+54e5b2ec60 via fabric - fabric-keybindings-v0 0.2.9+b4f4f6cd60 via fabric - fabric-lifecycle-events-v1 2.0.1+2540745460 via fabric - fabric-loot-tables-v1 1.0.10+d7c144a860 via fabric - fabric-mining-level-api-v1 2.0.3+d1027f7d60 via fabric - fabric-models-v0 0.3.5+d7c144a860 via fabric - fabric-networking-api-v1 1.0.20+d882b91560 via fabric - fabric-networking-v0 0.3.7+b4f4f6cd60 via fabric - fabric-object-builder-api-v1 2.0.2+34b2a0ce60 via fabric - fabric-particles-v1 0.2.11+526dc1ac60 via fabric - fabric-registry-sync-v0 0.9.7+0d9ab37260 via fabric - fabric-renderer-api-v1 0.4.12+d882b91560 via fabric - fabric-renderer-indigo 0.4.16+d8c7b9ae60 via fabric - fabric-renderer-registries-v1 3.2.10+b4f4f6cd60 via fabric - fabric-rendering-data-attachment-v1 0.3.6+d7c144a860 via fabric - fabric-rendering-fluids-v1 2.0.1+54e5b2ec60 via fabric - fabric-rendering-v0 1.1.12+b4f4f6cd60 via fabric - fabric-rendering-v1 1.10.6+54e5b2ec60 via fabric - fabric-resource-conditions-api-v1 2.0.1+d1027f7d60 via fabric - fabric-resource-loader-v0 0.4.17+801ec85b60 via fabric - fabric-screen-api-v1 1.0.9+d882b91560 via fabric - fabric-screen-handler-api-v1 1.1.13+d7c144a860 via fabric - fabric-textures-v0 1.0.11+3ac43d9560 via fabric - fabric-transfer-api-v1 1.5.13+cca23f9360 via fabric - fabricloader 0.13.3 - java 17 - kanos_config 0.1.4+1.14.4-1.17.1 via pehkui - minecraft 1.18.2 - notenoughcrashes 4.1.4+1.18.1 - pehkui 3.1.0+1.14.4-1.18.1 [18:20:16] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/D:/MultiMC/libraries/net/fabricmc/sponge-mixin/0.11.2+mixin.0.8.5/sponge-mixin-0.11.2+mixin.0.8.5.jar Service=Knot/Fabric Env=CLIENT [18:20:16] [main/INFO]: Compatibility level set to JAVA_16 [18:20:16] [main/INFO]: Compatibility level set to JAVA_17 [18:20:20] [main/INFO]: Downloading deobfuscation mappings: 1.18.2+build.2 for the first launch [18:20:26] [main/WARN]: @Inject(@at("INVOKE")) Shift.BY=3 on fabric-lifecycle-events-v1.mixins.json:client.WorldChunkMixin::handler$zdf000$onLoadBlockEntity exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning. [18:20:28] [Render thread/ERROR]: Minecraft has crashed! net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_746 failed at Not Enough Crashes deobfuscated stack trace.(1.18.2+build.2) ~[?:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:418) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.13.3.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?] at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?] at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] Caused by: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_746 failed at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:252) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155) ~[fabric-loader-0.13.3.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.minecraft.client.main.Main.main(Main:206) ~[minecraft-1.18.2-client.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) ~[fabric-loader-0.13.3.jar:?] ... 10 more 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) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155) ~[fabric-loader-0.13.3.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.minecraft.client.main.Main.main(Main:206) ~[minecraft-1.18.2-client.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) ~[fabric-loader-0.13.3.jar:?] ... 10 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Constant modifier method sendMovementPacketsModifyMinVelocity(D)D in pehkui.mixins.json:client.ClientPlayerEntityMixin from mod pehkui failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap Pehkui-refmap.json at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1385) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1052) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150) ~[fabric-loader-0.13.3.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155) ~[fabric-loader-0.13.3.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.minecraft.client.main.Main.main(Main:206) ~[minecraft-1.18.2-client.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) ~[fabric-loader-0.13.3.jar:?] ... 10 more

commented

Looking into minecrafts source code more, in 1.18.1 (and below assumedly) the targeted line in sendMovementPackets looks like this:
boolean bl3 = d * d + e * e + f * f > 9.0E-4D || this.ticksSinceLastPositionPacketSent >= 20;
9.0E-4D is the constant that is being modified using mixins
In 1.18.2 the line has changed to this:
boolean bl2 = MathHelper.squaredMagnitude(mode2, d, e) > MathHelper.square(2.0E-4D) || this.ticksSinceLastPositionPacketSent >= 20;
The constant has changed to 2.0E-4D, and because of this the mixin cannot find a target and throws an error

commented

@Virtuoel Has there been any news on this mod? Kind of holding me back in updating my pack on 1.18, so I'm curious.

commented

Resolved with 3.2.0 release.