NOISSUE Install jarmods for modpacks.ch

This patch will now install any jarmods from modpacks.ch packs,
searching the 'jarmods' directory to find them.
This commit is contained in:
Jamie Mansfield 2021-02-25 14:43:04 +00:00
parent 9d91cd496f
commit 9c69b0cdde
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

@ -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);