summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/MinecraftVersion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/MinecraftVersion.cpp')
-rw-r--r--logic/minecraft/MinecraftVersion.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp
index 5a759421..982a5ac3 100644
--- a/logic/minecraft/MinecraftVersion.cpp
+++ b/logic/minecraft/MinecraftVersion.cpp
@@ -60,11 +60,20 @@ void MinecraftVersion::applyFileTo(MinecraftProfile *version)
getVersionFile()->applyTo(version);
}
+QJsonDocument MinecraftVersion::toJson(bool saveOrder)
+{
+ return getVersionFile()->toJson(saveOrder);
+}
+
VersionFilePtr MinecraftVersion::getVersionFile()
{
QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor));
- return ProfileUtils::parseBinaryJsonFile(versionFile);
+ auto loadedVersionFile = ProfileUtils::parseBinaryJsonFile(versionFile);
+ loadedVersionFile->name = "Minecraft";
+ //FIXME: possibly not the best place for this... but w/e
+ loadedVersionFile->setCustomizable(true);
+ return loadedVersionFile;
}