SKCraft / Launcher

🚀 Distribute your Minecraft modpacks with a custom launcher
Other
620 stars 433 forks source link

[backward compatibility issue + suggestion ] better Java runtime selection broke backward compatibility #436

Closed sylphio closed 3 years ago

sylphio commented 3 years ago

Hi,

Maybe it is too early for a report but the new "better java runtime selection" broke existing packs. i have two modpack one really old 1.7.10 and another 1.17.1.

Previously, pack were launch using the same java as the launcher and now with the new "better java runtime selection" the most recent java it can find on the computer is used. Obviously, using the most recent java do not work with 1.7.10 pack so it mean all my user will need to override the java instance for something that was working perfectly for years.

As a way to better support backward compatibility, maybe the new behavior should be optional. The launcher should continue the "launcher java" as a default and only override it if the user actively select a new java runtime in the instance settings.

In the future, it may even allow newer pack to have a new "java version" field in the modpack.json to steer the "better java runtime selection" without broking old pack and requiring them to be rebuild.

It my two cent :) Thank you and have a nice day­.

hedgehog1029 commented 3 years ago

Previously, pack were launch using the same java as the launcher

Actually, the previous behavior was to either use the Java path configured in the options, or to use the default java binary on the system path. So the old behavior effectively only works if the default Java is correct. For most modded players who previously didn't have any sort of Java selection this is probably the case.

In the future, it may even allow newer pack to have a new "java version" field in the modpack.json to steer the "better java runtime selection" without broking old pack and requiring them to be rebuild.

The launcher does actually do this; there's a field in the Minecraft version manifest called javaVersion which the official launcher uses to select the correct Java.

If you rebuild your 1.7.10 pack, it should pull down the latest version manifest with the javaVersion field present, which you can then push as an update to make sure your clients have the new information; this should hopefully resolve the problem.

The Java selection stuff is still in beta for sure, and I need to document it on the wiki.

sylphio commented 3 years ago

Effectively it work with a rebuild of the old package. Great thank you.