From b29ef49415a96d0f9e49cc97095742206a4cb5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 3 Apr 2016 22:17:06 +0200 Subject: [PATCH] NOISSUE fix some forge version processing issues --- logic/minecraft/forge/ForgeInstaller.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/logic/minecraft/forge/ForgeInstaller.cpp b/logic/minecraft/forge/ForgeInstaller.cpp index 155a2cac9..353328ab0 100644 --- a/logic/minecraft/forge/ForgeInstaller.cpp +++ b/logic/minecraft/forge/ForgeInstaller.cpp @@ -99,7 +99,7 @@ void ForgeInstaller::prepare(const QString &filename, const QString &universalUr QJsonObject installObj = installVal.toObject(); QString libraryName = installObj.value("path").toString(); internalPath = installObj.value("filePath").toString(); - m_forgeVersionString = installObj.value("version").toString().remove("Forge").trimmed(); + m_forgeVersionString = installObj.value("version").toString().remove("Forge", Qt::CaseInsensitive).trimmed(); // where do we put the library? decode the mojang path GradleSpecifier lib(libraryName); @@ -265,9 +265,16 @@ bool ForgeInstaller::add(OneSixInstance *to) m_forge_json->fileId = id(); m_forge_json->version = m_forgeVersionString; m_forge_json->dependsOnMinecraftVersion = to->intendedVersionId(); - m_forge_json->minecraftVersion.clear(); m_forge_json->order = 5; + // reset some things we do not want to be passed along. + m_forge_json->m_releaseTime = QDateTime(); + m_forge_json->m_updateTime = QDateTime(); + m_forge_json->minimumLauncherVersion = -1; + m_forge_json->type.clear(); + m_forge_json->minecraftArguments.clear(); + m_forge_json->minecraftVersion.clear(); + QSaveFile file(filename(to->instanceRoot())); if (!file.open(QFile::WriteOnly)) {