aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/instance/ModFolderPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/instance/ModFolderPage.cpp')
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index fcb6022d..8113fe85 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -56,6 +56,8 @@
#include "minecraft/VersionFilterData.h"
#include "minecraft/PackProfile.h"
+#include "modplatform/ModAPI.h"
+
#include "Version.h"
#include "ui/dialogs/ProgressDialog.h"
#include "tasks/SequentialTask.h"
@@ -388,9 +390,8 @@ void ModFolderPage::on_actionInstall_mods_triggered()
if(m_inst->typeName() != "Minecraft"){
return; //this is a null instance or a legacy instance
}
- bool hasFabric = !((MinecraftInstance *)m_inst)->getPackProfile()->getComponentVersion("net.fabricmc.fabric-loader").isEmpty();
- bool hasForge = !((MinecraftInstance *)m_inst)->getPackProfile()->getComponentVersion("net.minecraftforge").isEmpty();
- if (!hasFabric && !hasForge) {
+ auto profile = ((MinecraftInstance *)m_inst)->getPackProfile();
+ if (profile->getModLoader() == ModAPI::Unspecified) {
QMessageBox::critical(this,tr("Error"),tr("Please install a mod loader first!"));
return;
}