From efa3bb33f52f811727819132b526cfb75558a4cd Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 3 Jun 2021 15:03:19 +0100 Subject: [PATCH 1/3] NOISSUE Disable 'Install Forge' button when game is running --- application/pages/instance/VersionPage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp index 54d75d06..7f7ba860 100644 --- a/application/pages/instance/VersionPage.cpp +++ b/application/pages/instance/VersionPage.cpp @@ -203,11 +203,11 @@ void VersionPage::updateVersionControls() { // FIXME: this is a dirty hack auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft")); - bool newCraft = controlsEnabled && (minecraftVersion >= Version("1.14")); - bool oldCraft = controlsEnabled && (minecraftVersion <= Version("1.12.2")); - ui->actionInstall_Fabric->setEnabled(newCraft); - ui->actionInstall_Forge->setEnabled(true); - ui->actionInstall_LiteLoader->setEnabled(oldCraft); + bool newCraft = minecraftVersion >= Version("1.14"); + bool oldCraft = minecraftVersion <= Version("1.12.2"); + ui->actionInstall_Fabric->setEnabled(controlsEnabled && newCraft); + ui->actionInstall_Forge->setEnabled(controlsEnabled); + ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && oldCraft); ui->actionReload->setEnabled(true); updateButtons(); } From 6dd1fdbaf96ebd4845d1596c06dc37099e7b4caa Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 3 Jun 2021 15:16:03 +0100 Subject: [PATCH 2/3] NOISSUE Fail pack installation for download errors for FTB This effectively reverts the changes made in [1] to resolve GH-3304. [1] 05ffcf706bff92bdc48f3063d6a64508f8b7674c --- api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp index 068e3592..ddc7fe35 100644 --- a/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp +++ b/api/logic/modplatform/modpacksch/FTBPackInstallTask.cpp @@ -109,12 +109,7 @@ void PackInstallTask::downloadPack() connect(jobPtr.get(), &NetJob::failed, [&](QString reason) { jobPtr.reset(); - - // FIXME: Temporarily ignore file download failures (matching FTB's installer), - // while FTB's data is fucked. - qWarning() << "Failed to download files for modpack: " + reason; - - install(); + emitFailed(reason); }); connect(jobPtr.get(), &NetJob::progress, [&](qint64 current, qint64 total) { From 3390367d931cc47a8c9980d456546326d5c5e2cd Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 9 Jun 2021 20:48:46 +0100 Subject: [PATCH 3/3] NOISSUE Support CurseForge modpacks using Fabric Loader --- api/logic/InstanceImportTask.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/logic/InstanceImportTask.cpp b/api/logic/InstanceImportTask.cpp index fe2cdd75..3eac4d57 100644 --- a/api/logic/InstanceImportTask.cpp +++ b/api/logic/InstanceImportTask.cpp @@ -238,6 +238,7 @@ void InstanceImportTask::processFlame() } QString forgeVersion; + QString fabricVersion; for(auto &loader: pack.minecraft.modLoaders) { auto id = loader.id; @@ -247,6 +248,12 @@ void InstanceImportTask::processFlame() forgeVersion = id; continue; } + if(id.startsWith("fabric-")) + { + id.remove("fabric-"); + fabricVersion = id; + continue; + } logWarning(tr("Unknown mod loader in manifest: %1").arg(id)); } @@ -281,6 +288,10 @@ void InstanceImportTask::processFlame() } components->setComponentVersion("net.minecraftforge", forgeVersion); } + if(!fabricVersion.isEmpty()) + { + components->setComponentVersion("net.fabricmc.fabric-loader", fabricVersion); + } if (m_instIcon != "default") { instance.setIconKey(m_instIcon);