Merge pull request #890 from Scrumplex/fix-technic-forge
Fix Technic instances using Forge
This commit is contained in:
commit
998271414e
@ -187,17 +187,17 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static QStringList possibleLoaders{
|
// <Technic library name prefix> -> <our component name>
|
||||||
"net.minecraftforge:minecraftforge:",
|
static QMap<QString, QString> loaderMap {
|
||||||
"net.fabricmc:fabric-loader:",
|
{"net.minecraftforge:minecraftforge:", "net.minecraftforge"},
|
||||||
"org.quiltmc:quilt-loader:"
|
{"net.fabricmc:fabric-loader:", "net.fabricmc.fabric-loader"},
|
||||||
|
{"org.quiltmc:quilt-loader:", "org.quiltmc.quilt-loader"}
|
||||||
};
|
};
|
||||||
for (const auto& loader : possibleLoaders)
|
for (const auto& loader : loaderMap.keys())
|
||||||
{
|
{
|
||||||
if (libraryName.startsWith(loader))
|
if (libraryName.startsWith(loader))
|
||||||
{
|
{
|
||||||
auto loaderComponent = loader.chopped(1).replace(":", ".");
|
components->setComponentVersion(loaderMap.value(loader), libraryName.section(':', 2));
|
||||||
components->setComponentVersion(loaderComponent, libraryName.section(':', 2));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user