summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/onesix/OneSixInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-03-31 23:47:56 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:20:02 +0200
commite0596d3c86806d952a9811f306f497f84430ae3c (patch)
tree283b039fd850d52d7b1ce7c5456f60f0fcdcf9af /api/logic/minecraft/onesix/OneSixInstance.cpp
parent2ac0edbbdb27e12bae00c4779da135582bde89f5 (diff)
downloadMultiMC-e0596d3c86806d952a9811f306f497f84430ae3c.tar
MultiMC-e0596d3c86806d952a9811f306f497f84430ae3c.tar.gz
MultiMC-e0596d3c86806d952a9811f306f497f84430ae3c.tar.lz
MultiMC-e0596d3c86806d952a9811f306f497f84430ae3c.tar.xz
MultiMC-e0596d3c86806d952a9811f306f497f84430ae3c.zip
NOISSUE Make forge installable again
Diffstat (limited to 'api/logic/minecraft/onesix/OneSixInstance.cpp')
-rw-r--r--api/logic/minecraft/onesix/OneSixInstance.cpp32
1 files changed, 25 insertions, 7 deletions
diff --git a/api/logic/minecraft/onesix/OneSixInstance.cpp b/api/logic/minecraft/onesix/OneSixInstance.cpp
index d89f6f87..4a4380a4 100644
--- a/api/logic/minecraft/onesix/OneSixInstance.cpp
+++ b/api/logic/minecraft/onesix/OneSixInstance.cpp
@@ -34,8 +34,15 @@
OneSixInstance::OneSixInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir)
: MinecraftInstance(globalSettings, settings, rootDir)
{
+ // set explicitly during instance creation
m_settings->registerSetting({"IntendedVersion", "MinecraftVersion"}, "");
- m_settings->registerSetting("LWJGLVersion", "");
+
+ // defaults to the version we've been using for years (2.9.1)
+ m_settings->registerSetting("LWJGLVersion", "2.9.1");
+
+ // optionals
+ m_settings->registerSetting("ForgeVersion", "");
+ m_settings->registerSetting("LiteloaderVersion", "");
}
void OneSixInstance::init()
@@ -499,6 +506,14 @@ bool OneSixInstance::setComponentVersion(const QString& uid, const QString& vers
{
settings()->set("LWJGLVersion", version);
}
+ else if (uid == "net.minecraftforge")
+ {
+ settings()->set("ForgeVersion", version);
+ }
+ else if (uid == "com.liteloader")
+ {
+ settings()->set("LiteloaderVersion", version);
+ }
if(getMinecraftProfile())
{
clearProfile();
@@ -515,12 +530,15 @@ QString OneSixInstance::getComponentVersion(const QString& uid) const
}
else if(uid == "org.lwjgl")
{
- auto version = settings()->get("LWJGLVersion").toString();
- if(version.isEmpty())
- {
- return "2.9.1";
- }
- return version;
+ return settings()->get("LWJGLVersion").toString();
+ }
+ else if(uid == "net.minecraftforge")
+ {
+ return settings()->get("ForgeVersion").toString();
+ }
+ else if(uid == "com.liteloader")
+ {
+ return settings()->get("LiteloaderVersion").toString();
}
return QString();
}