Merge pull request #587 from microwin7/patch-8

Java recommend don't valid for starting minecraft client
This commit is contained in:
Gravit 2022-05-29 14:51:15 +07:00 committed by GitHub
commit 2c1129aa5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,10 +108,14 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti
}
}
}
if (version.compareTo(ClientProfile.Version.MC117) >= 0) {
if (version.compareTo(ClientProfile.Version.MC117) >= 0 && version.compareTo(ClientProfile.Version.MC118) < 0) {
builder.setMinJavaVersion(16);
builder.setRecommendJavaVersion(16);
}
if (version.compareTo(ClientProfile.Version.MC118) >= 0) {
builder.setMinJavaVersion(17);
builder.setRecommendJavaVersion(17);
}
jvmArgs.add("-Dfml.ignorePatchDiscrepancies=true");
jvmArgs.add("-Dfml.ignoreInvalidMinecraftCertificates=true");
builder.setJvmArgs(jvmArgs);
@ -192,8 +196,7 @@ public static MakeProfileOption[] getMakeProfileOptionsFromDir(Path dir, ClientP
List<MakeProfileOption> options = new ArrayList<>(2);
if (Files.exists(dir.resolve("forge.jar"))) {
options.add(new MakeProfileOptionForge());
}
else if (Files.exists(dir.resolve("libraries/net/minecraftforge/forge"))) {
} else if (Files.exists(dir.resolve("libraries/net/minecraftforge/forge"))) {
if (version.compareTo(ClientProfile.Version.MC1122) > 0) {
options.add(new MakeProfileOptionForge(dir));
} else {