Merge pull request #1395 from PrismLauncher/backport-1387-to-release-7.x

[Backport release-7.x] Check if any modloader is installed
This commit is contained in:
TheKodeToad 2023-07-17 17:42:00 +01:00 committed by GitHub
commit 71a7358287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,8 +396,11 @@ QStringList MinecraftInstance::extraArguments()
agent->library()->getApplicableFiles(runtimeContext(), jar, temp1, temp2, temp3, getLocalLibraryPath());
list.append("-javaagent:"+jar[0]+(agent->argument().isEmpty() ? "" : "="+agent->argument()));
}
if (version->getModLoaders().value() & ResourceAPI::Quilt && settings()->get("DisableQuiltBeacon").toBool()) {
list.append("-Dloader.disable_beacon=true");
{
const auto loaders = version->getModLoaders();
if (loaders.has_value() && loaders.value() & ResourceAPI::Quilt && settings()->get("DisableQuiltBeacon").toBool())
list.append("-Dloader.disable_beacon=true");
}
return list;
}