diff options
Diffstat (limited to 'launcher/modplatform/flame/FlameModIndex.cpp')
-rw-r--r-- | launcher/modplatform/flame/FlameModIndex.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp index 2c3adee4..c7b86b5c 100644 --- a/launcher/modplatform/flame/FlameModIndex.cpp +++ b/launcher/modplatform/flame/FlameModIndex.cpp @@ -3,6 +3,7 @@ #include "Json.h" #include "minecraft/MinecraftInstance.h" #include "minecraft/PackProfile.h" +#include "modplatform/flame/FlameAPI.h" #include "net/NetJob.h" void FlameMod::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj) @@ -43,8 +44,9 @@ void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack, BaseInstance* inst) { QVector<ModPlatform::IndexedVersion> unsortedVersions; - bool hasFabric = !(dynamic_cast<MinecraftInstance*>(inst))->getPackProfile()->getComponentVersion("net.fabricmc.fabric-loader").isEmpty(); - QString mcVersion = (dynamic_cast<MinecraftInstance*>(inst))->getPackProfile()->getComponentVersion("net.minecraft"); + auto profile = (dynamic_cast<MinecraftInstance*>(inst))->getPackProfile(); + bool hasFabric = FlameAPI::getMappedModLoader(profile->getModLoader()) == ModAPI::Fabric; + QString mcVersion = profile->getComponentVersion("net.minecraft"); for (auto versionIter : arr) { auto obj = versionIter.toObject(); @@ -69,6 +71,7 @@ void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack, for (auto m : modules) { auto fname = Json::requireString(m.toObject(), "foldername"); // FIXME: This does not work properly when a mod supports more than one mod loader, since + // FIXME: This also doesn't deal with Quilt mods at the moment // they bundle the meta files for all of them in the same arquive, even when that version // doesn't support the given mod loader. if (hasFabric) { |