From 80d3f734c67b4907ffd4ee52cef04d27949d1170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 17 Nov 2014 21:45:29 +0100 Subject: GH-619 Add libraries missing in copies of 1.7.10 FTB packs --- logic/OneSixFTBInstance.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'logic') diff --git a/logic/OneSixFTBInstance.cpp b/logic/OneSixFTBInstance.cpp index 2be74c3c..d1585155 100644 --- a/logic/OneSixFTBInstance.cpp +++ b/logic/OneSixFTBInstance.cpp @@ -40,6 +40,23 @@ void OneSixFTBInstance::copy(const QDir &newDir) } root.remove("libraries"); 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("order", 1); root.insert("fileId", QString("org.multimc.ftb.pack.json")); -- cgit v1.2.3