NOISSUE Support CurseForge modpacks using Fabric Loader

This commit is contained in:
Jamie Mansfield 2021-06-09 20:48:46 +01:00
parent 6dd1fdbaf9
commit 3390367d93
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

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