NOISSUE Support Fabric mod loader for modpacks.ch

There aren't any (currently) packs on modpacks.ch that use Fabric, but
they do have support in their modpacklauncher. This patch just means
we preemptively have support should any packs that require it be
introduced.
This commit is contained in:
Jamie Mansfield 2021-02-25 13:55:26 +00:00
parent 1edcd9b86e
commit 384680ca13
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

@ -30,7 +30,7 @@ void PackInstallTask::executeTask()
if (vInfo.name == m_version_name) {
found = true;
version = vInfo;
continue;
break;
}
}
@ -102,14 +102,19 @@ void PackInstallTask::install()
for(auto target : m_version.targets) {
if(target.type == "game" && target.name == "minecraft") {
components->setComponentVersion("net.minecraft", target.version, true);
continue;
break;
}
}
for(auto target : m_version.targets) {
if(target.type == "modloader" && target.name == "forge") {
if(target.type != "modloader") continue;
if(target.name == "forge") {
components->setComponentVersion("net.minecraftforge", target.version, true);
}
else if(target.name == "fabric") {
components->setComponentVersion("net.fabricmc.fabric-loader", target.version, true);
}
}
components->saveNow();