Merge pull request #685 from kthchew/fix/technic-quilt

Add Quilt support for Technic modpacks
This commit is contained in:
flow 2022-06-06 18:03:05 -03:00 committed by Sefa Eyeoglu
parent 75b7ca814a
commit 1c70b29b3d
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -185,13 +185,22 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1, 1));
}
}
else if (libraryName.startsWith("net.minecraftforge:minecraftforge:"))
else
{
components->setComponentVersion("net.minecraftforge", libraryName.section(':', 2));
}
else if (libraryName.startsWith("net.fabricmc:fabric-loader:"))
{
components->setComponentVersion("net.fabricmc.fabric-loader", libraryName.section(':', 2));
static QStringList possibleLoaders{
"net.minecraftforge:minecraftforge:",
"net.fabricmc:fabric-loader:",
"org.quiltmc:quilt-loader:"
};
for (const auto& loader : possibleLoaders)
{
if (libraryName.startsWith(loader))
{
auto loaderComponent = loader.chopped(1).replace(":", ".");
components->setComponentVersion(loaderComponent, libraryName.section(':', 2));
break;
}
}
}
}
}