fix: add theoretical support for NeoForge in FTB modpacks

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-08-17 22:20:43 +02:00
parent 62c14cea2a
commit aac734d174
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951
2 changed files with 9 additions and 1 deletions

View File

@ -59,7 +59,11 @@ Modpack parseDirectory(QString path)
auto obj = Json::requireObject(target, "target");
auto name = Json::requireString(obj, "name", "name");
auto version = Json::requireString(obj, "version", "version");
if (name == "forge") {
if (name == "neoforge") {
modpack.loaderType = ResourceAPI::NeoForge;
modpack.version = version;
break;
} else if (name == "forge") {
modpack.loaderType = ResourceAPI::Forge;
modpack.version = version;
break;

View File

@ -68,6 +68,10 @@ void PackInstallTask::copySettings()
auto modloader = m_pack.loaderType;
if (modloader.has_value())
switch (modloader.value()) {
case ResourceAPI::NeoForge: {
components->setComponentVersion("net.neoforged", m_pack.version, true);
break;
}
case ResourceAPI::Forge: {
components->setComponentVersion("net.minecraftforge", m_pack.version, true);
break;