From 384680ca135eb8fbe5fe366af7c2328e36e7b12c Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 25 Feb 2021 13:55:26 +0000 Subject: [PATCH] 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. --- .../modplatform/modpacksch/FTBPackInstallTask.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp index dc2b05fe..73b8975a 100644 --- a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp +++ b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp @@ -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();