mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-20 18:57:14 +00:00
HACK add option to launch without a main jar
This commit is contained in:
@@ -187,8 +187,16 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
||||
// if we have mainJar, just use it
|
||||
if(root.contains("mainJar"))
|
||||
{
|
||||
QJsonObject libObj = requireObject(root, "mainJar");
|
||||
out->mainJar = libraryFromJson(libObj, filename);
|
||||
auto val = root.value("mainJar");
|
||||
if(val.isNull())
|
||||
{
|
||||
out->removeMainJar = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
QJsonObject libObj = requireObject(root, "mainJar");
|
||||
out->mainJar = libraryFromJson(libObj, filename);
|
||||
}
|
||||
}
|
||||
// else reconstruct it from downloads and id ... if that's available
|
||||
else if(!out->minecraftVersion.isEmpty())
|
||||
@@ -276,6 +284,10 @@ QJsonDocument OneSixVersionFormat::versionFileToJson(const VersionFilePtr &patch
|
||||
{
|
||||
root.insert("mainJar", libraryToJson(patch->mainJar.get()));
|
||||
}
|
||||
else if(patch->removeMainJar)
|
||||
{
|
||||
root.insert("mainJar", QJsonValue());
|
||||
}
|
||||
writeString(root, "appletClass", patch->appletClass);
|
||||
writeStringList(root, "+tweakers", patch->addTweakers);
|
||||
writeStringList(root, "+traits", patch->traits.toList());
|
||||
|
||||
Reference in New Issue
Block a user