From 2d2b082539424e5ff631c32ca2b9f4a0a2d51c1f Mon Sep 17 00:00:00 2001 From: furokku Date: Sat, 3 Feb 2024 23:42:19 +0200 Subject: [PATCH 1/3] fixes #63 --- launcher/minecraft/MinecraftInstance.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index faa08cd11..f53198b2a 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -543,12 +543,16 @@ QString MinecraftInstance::getLauncher() QStringList MinecraftInstance::processAuthArgs(AuthSessionPtr session) const { QStringList args; + QString v = m_components->getProfile()->getMinecraftVersion(); + if (session->uses_custom_api_servers) { - args << "-Dminecraft.api.env=custom"; - args << "-Dminecraft.api.auth.host=" + session->auth_server_url; - args << "-Dminecraft.api.account.host=" + session->account_server_url; - args << "-Dminecraft.api.session.host=" + session->session_server_url; - args << "-Dminecraft.api.services.host=" + session->services_server_url; + if (v != "1.16.4" && v != "1.16.5") { + args << "-Dminecraft.api.env=custom"; + args << "-Dminecraft.api.auth.host=" + session->auth_server_url; + args << "-Dminecraft.api.account.host=" + session->account_server_url; + args << "-Dminecraft.api.session.host=" + session->session_server_url; + args << "-Dminecraft.api.services.host=" + session->services_server_url; + } auto agents = m_components->getProfile()->getAgents(); for (auto agent : agents) { if (agent->library()->artifactPrefix() == "moe.yushi:authlibinjector") { From 6e29802de958f392b9a0716603f07afcaf0b3285 Mon Sep 17 00:00:00 2001 From: furokku floc <104717368+furokku@users.noreply.github.com> Date: Sun, 3 Mar 2024 23:06:12 +0200 Subject: [PATCH 2/3] change tabs to spaces --- launcher/minecraft/MinecraftInstance.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index f53198b2a..78b1b2191 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -547,11 +547,11 @@ QStringList MinecraftInstance::processAuthArgs(AuthSessionPtr session) const if (session->uses_custom_api_servers) { if (v != "1.16.4" && v != "1.16.5") { - args << "-Dminecraft.api.env=custom"; - args << "-Dminecraft.api.auth.host=" + session->auth_server_url; - args << "-Dminecraft.api.account.host=" + session->account_server_url; - args << "-Dminecraft.api.session.host=" + session->session_server_url; - args << "-Dminecraft.api.services.host=" + session->services_server_url; + args << "-Dminecraft.api.env=custom"; + args << "-Dminecraft.api.auth.host=" + session->auth_server_url; + args << "-Dminecraft.api.account.host=" + session->account_server_url; + args << "-Dminecraft.api.session.host=" + session->session_server_url; + args << "-Dminecraft.api.services.host=" + session->services_server_url; } auto agents = m_components->getProfile()->getAgents(); for (auto agent : agents) { From d4635c1a040703ff3d07c12b7b91a6278b3bcf94 Mon Sep 17 00:00:00 2001 From: furokku floc <104717368+furokku@users.noreply.github.com> Date: Sun, 3 Mar 2024 23:08:22 +0200 Subject: [PATCH 3/3] forgot a thing --- launcher/minecraft/MinecraftInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 78b1b2191..ead1fa89d 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -544,7 +544,7 @@ QStringList MinecraftInstance::processAuthArgs(AuthSessionPtr session) const { QStringList args; QString v = m_components->getProfile()->getMinecraftVersion(); - + if (session->uses_custom_api_servers) { if (v != "1.16.4" && v != "1.16.5") { args << "-Dminecraft.api.env=custom";