[FIX][STYLE] Minimal recommend JAVA for 1.18+ set 17

This commit is contained in:
microwin7 2022-05-29 06:34:26 +03:00
parent 4ff13a67b9
commit 3a43ebff45

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 {