diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-02-27 22:02:56 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-02-27 22:02:56 +0100 |
commit | a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5 (patch) | |
tree | 5fcdca854ff8c93ac6f5b5715a2ff3d0dc7a8ad8 /logic/minecraft/MinecraftVersionList.cpp | |
parent | 17ad1e64f824fba6d8f153191effdb2af7d387c8 (diff) | |
download | MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.gz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.lz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.tar.xz MultiMC-a0b47aee5ba8d96e5ceec12798be9f63a16dbcd5.zip |
NOISSUE move version file reading and writing to dedicated namespaces
Diffstat (limited to 'logic/minecraft/MinecraftVersionList.cpp')
-rw-r--r-- | logic/minecraft/MinecraftVersionList.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp index 9a1c18b7..3e970bf7 100644 --- a/logic/minecraft/MinecraftVersionList.cpp +++ b/logic/minecraft/MinecraftVersionList.cpp @@ -27,6 +27,8 @@ #include "ParseUtils.h" #include "ProfileUtils.h" #include "VersionFilterData.h" +#include "onesix/OneSixVersionFormat.h" +#include "MojangVersionFormat.h" #include <FileSystem.h> static const char * localVersionCache = "versions/versions.dat"; @@ -510,7 +512,7 @@ void MCVListVersionUpdateTask::json_downloaded() VersionFilePtr file; try { - file = VersionFile::fromMojangJson(jsonDoc, "net.minecraft.json"); + file = MojangVersionFormat::fromJson(jsonDoc, "net.minecraft.json"); } catch (Exception &e) { @@ -526,7 +528,7 @@ void MCVListVersionUpdateTask::json_downloaded() file->fileId = "net.minecraft"; // now dump the file to disk - auto doc = file->toJson(false); + auto doc = OneSixVersionFormat::toJson(file, false); auto newdata = doc.toBinaryData(); auto id = updatedVersion->descriptor(); QString targetPath = "versions/" + id + "/" + id + ".dat"; |