
Mixin compatibility level set too high for legacy versions
embeddedt opened this issue ยท 7 comments
This causes the following crash on Forge 1.16 running with Java 11.
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:57)
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.launch.MixinInitialisationError: Error initialising mixin config block_limit_fix.mixins.json
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:153)
at org.spongepowered.asm.mixin.Mixins.createConfiguration(Mixins.java:100)
at org.spongepowered.asm.mixin.Mixins.addConfiguration(Mixins.java:87)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.addConfig(MixinPlatformManager.java:262)
at org.spongepowered.asm.launch.platform.MixinPlatformAgentDefault.prepare(MixinPlatformAgentDefault.java:46)
at org.spongepowered.asm.launch.platform.MixinContainer.prepare(MixinContainer.java:122)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.createContainerFor(MixinPlatformManager.java:144)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.addContainer(MixinPlatformManager.java:134)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.addNestedContainers(MixinPlatformManager.java:152)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.scanForContainers(MixinPlatformManager.java:213)
at org.spongepowered.asm.launch.platform.MixinPlatformManager.inject(MixinPlatformManager.java:186)
at org.spongepowered.asm.launch.MixinBootstrap.inject(MixinBootstrap.java:202)
at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.initializeLaunch(MixinLaunchPluginLegacy.java:201)
at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.initializeLaunch(MixinLaunchPluginLegacy.java:195)
at cpw.mods.modlauncher.LaunchPluginHandler.lambda$announceLaunch$9(LaunchPluginHandler.java:97)
at java.base/java.util.HashMap.forEach(HashMap.java:1337)
at cpw.mods.modlauncher.LaunchPluginHandler.announceLaunch(LaunchPluginHandler.java:97)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:52)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82)
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
... 8 more
Caused by: java.lang.IllegalArgumentException: The requested compatibility level JAVA_17 could not be set. Level is not supported by the active JRE or ASM version (Java 11.0, ASM 9.1 (ASM10_EXPERIMENTAL))
at org.spongepowered.asm.mixin.MixinEnvironment.setCompatibilityLevel(MixinEnvironment.java:1570)
at org.spongepowered.asm.mixin.transformer.MixinConfig.initCompatibilityLevel(MixinConfig.java:555)
at org.spongepowered.asm.mixin.transformer.MixinConfig.postInit(MixinConfig.java:500)
at org.spongepowered.asm.mixin.transformer.MixinConfig.onLoad(MixinConfig.java:428)
at org.spongepowered.asm.mixin.transformer.MixinConfig.create(MixinConfig.java:1285)
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:148)
... 28 more
Thank you! I think you also need to adjust the Gradle script so that the produced classfiles are marked as compatible with Java 8 and not Java 17, otherwise I get the following error:
java.lang.UnsupportedClassVersionError: io/github/tropheusj/block_limit_fix/BlockLimitFixForge has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java
Runtime only recognizes class file versions up to 55.0
Should be something along the lines of changing source/target compatibility to 1.8 and/or setting the release option to 8, unless I've forgotten something.
can you test this one?
block_limit_fix-1.0.3-forge.jar.zip
how about this one?
block_limit_fix-1.0.3-forge.jar.zip