From 7befd63ccedd96c52b94c1845fff36f24ee3f1d1 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Sat, 15 Jul 2023 00:28:58 +0300 Subject: [PATCH] fixed settings Signed-off-by: Trial97 --- launcher/modplatform/import_ftb/PackInstallTask.cpp | 11 ++++------- .../ui/pages/modplatform/import_ftb/ListModel.cpp | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/launcher/modplatform/import_ftb/PackInstallTask.cpp b/launcher/modplatform/import_ftb/PackInstallTask.cpp index e55f6ffa6..b5e424d12 100644 --- a/launcher/modplatform/import_ftb/PackInstallTask.cpp +++ b/launcher/modplatform/import_ftb/PackInstallTask.cpp @@ -53,17 +53,14 @@ void PackInstallTask::copySettings() QString instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg"); auto instanceSettings = std::make_shared(instanceConfigPath); instanceSettings->suspendSave(); - instanceSettings->registerSetting("InstanceType", "OneSix"); - instanceSettings->set("InstanceType", "OneSix"); + MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath); + instance.settings()->set("InstanceType", "OneSix"); if (m_pack.jvmArgs.isValid() && !m_pack.jvmArgs.toString().isEmpty()) { - instanceSettings->registerSetting("OverrideJavaArgs", true); - instanceSettings->set("OverrideJavaArgs", true); - instanceSettings->registerSetting("JvmArgs", m_pack.jvmArgs.toString()); - instanceSettings->set("JvmArgs", m_pack.jvmArgs.toString()); + instance.settings()->set("OverrideJavaArgs", true); + instance.settings()->set("JvmArgs", m_pack.jvmArgs.toString()); } - MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath); auto components = instance.getPackProfile(); components->buildingFromScratch(); components->setComponentVersion("net.minecraft", m_pack.mcVersion, true); diff --git a/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp b/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp index 35d0334bf..dc78f451c 100644 --- a/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp +++ b/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp @@ -17,7 +17,6 @@ */ #include "ListModel.h" -#include #include #include #include