From 1c90681b3b90a68344283a8c725570999b8dba5d Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:53:38 +0700 Subject: [PATCH] [FEATURE] Support Minecraft 1.20.3/1.20.4 --- .../pro/gravit/launchserver/helper/MakeProfileHelper.java | 4 ++++ .../pro/gravit/launcher/profiles/ClientProfileVersions.java | 1 + 2 files changed, 5 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java index 6f2354ad..8bcac9bb 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java @@ -124,6 +124,10 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti builder.setMinJavaVersion(17); builder.setRecommendJavaVersion(17); } + if(version.compareTo(ClientProfileVersions.MINECRAFT_1_20_3) >= 0) { + builder.setMinJavaVersion(21); + builder.setRecommendJavaVersion(21); + } jvmArgs.add("-Dfml.ignorePatchDiscrepancies=true"); jvmArgs.add("-Dfml.ignoreInvalidMinecraftCertificates=true"); builder.setJvmArgs(jvmArgs); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java index 7d44b68d..e1c70b82 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java @@ -17,4 +17,5 @@ private ClientProfileVersions() { public static final ClientProfile.Version MINECRAFT_1_19 = ClientProfile.Version.of("1.19"); public static final ClientProfile.Version MINECRAFT_1_20 = ClientProfile.Version.of("1.20"); public static final ClientProfile.Version MINECRAFT_1_20_2 = ClientProfile.Version.of("1.20.2"); + public static final ClientProfile.Version MINECRAFT_1_20_3 = ClientProfile.Version.of("1.20.3"); }