GH-619 Add libraries missing in copies of 1.7.10 FTB packs

This commit is contained in:
Petr Mrázek 2014-11-17 21:45:29 +01:00
parent 9ad9826d08
commit 80d3f734c6

View File

@ -40,6 +40,23 @@ void OneSixFTBInstance::copy(const QDir &newDir)
} }
root.remove("libraries"); root.remove("libraries");
root.remove("id"); root.remove("id");
// HACK HACK HACK HACK
// A workaround for a problem in MultiMC, triggered by a historical problem in FTB,
// triggered by Mojang getting their library versions wrong in 1.7.10
if(intendedVersionId() == "1.7.10")
{
auto insert = [&outLibs, &libraryNames](QString name)
{
QJsonObject libObj;
libObj.insert("insert", QString("replace"));
libObj.insert("name", name);
libraryNames.push_back(name);
outLibs.prepend(libObj);
};
insert("com.google.guava:guava:16.0");
insert("org.apache.commons:commons-lang3:3.2.1");
}
root.insert("+libraries", outLibs); root.insert("+libraries", outLibs);
root.insert("order", 1); root.insert("order", 1);
root.insert("fileId", QString("org.multimc.ftb.pack.json")); root.insert("fileId", QString("org.multimc.ftb.pack.json"));