From 9c69b0cddee5445e315a063761c1a4ae7dfbfacf Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 25 Feb 2021 14:43:04 +0000 Subject: [PATCH] NOISSUE Install jarmods for modpacks.ch This patch will now install any jarmods from modpacks.ch packs, searching the 'jarmods' directory to find them. --- .../modplatform/modpacksch/FTBPackInstallTask.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp index bbf60912..59546b00 100644 --- a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp +++ b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp @@ -156,6 +156,18 @@ void PackInstallTask::install() } } + // install any jar mods + QDir jarModsDir(FS::PathCombine(m_stagingPath, "minecraft", "jarmods")); + if (jarModsDir.exists()) { + QStringList jarMods; + + for (const auto& info : jarModsDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files)) { + jarMods.push_back(info.absoluteFilePath()); + } + + components->installJarMods(jarMods); + } + components->saveNow(); instance.setName(m_instName);