ATLauncher: Avoid downloading Forge twice for older packs

This resolves a quirk where Forge would still be downloaded for use as
a jarmod, even when we detected Forge as a component.
This commit is contained in:
Jamie Mansfield 2022-05-01 18:12:21 +01:00
parent 1e6df7eec0
commit 97a83c9b7a
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

@ -574,8 +574,6 @@ void PackInstallTask::downloadMods()
jobPtr->addNetAction(dl);
auto path = FS::PathCombine(m_stagingPath, "minecraft", relpath, mod.file);
qDebug() << "Will download" << url << "to" << path;
modsToCopy[entry->getFullPath()] = path;
if(mod.type == ModType::Forge) {
auto vlist = APPLICATION->metadataIndex()->get("net.minecraftforge");
@ -597,6 +595,10 @@ void PackInstallTask::downloadMods()
qDebug() << "Jarmod: " + path;
jarmods.push_back(path);
}
// Download after Forge handling, to avoid downloading Forge twice.
qDebug() << "Will download" << url << "to" << path;
modsToCopy[entry->getFullPath()] = path;
}
}