From 3390367d931cc47a8c9980d456546326d5c5e2cd Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 9 Jun 2021 20:48:46 +0100 Subject: [PATCH] NOISSUE Support CurseForge modpacks using Fabric Loader --- api/logic/InstanceImportTask.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/logic/InstanceImportTask.cpp b/api/logic/InstanceImportTask.cpp index fe2cdd75..3eac4d57 100644 --- a/api/logic/InstanceImportTask.cpp +++ b/api/logic/InstanceImportTask.cpp @@ -238,6 +238,7 @@ void InstanceImportTask::processFlame() } QString forgeVersion; + QString fabricVersion; for(auto &loader: pack.minecraft.modLoaders) { auto id = loader.id; @@ -247,6 +248,12 @@ void InstanceImportTask::processFlame() forgeVersion = id; continue; } + if(id.startsWith("fabric-")) + { + id.remove("fabric-"); + fabricVersion = id; + continue; + } logWarning(tr("Unknown mod loader in manifest: %1").arg(id)); } @@ -281,6 +288,10 @@ void InstanceImportTask::processFlame() } components->setComponentVersion("net.minecraftforge", forgeVersion); } + if(!fabricVersion.isEmpty()) + { + components->setComponentVersion("net.fabricmc.fabric-loader", fabricVersion); + } if (m_instIcon != "default") { instance.setIconKey(m_instIcon);