diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-03-19 03:06:32 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-26 17:05:27 +0100 |
commit | ec6204e447fd9e88b4cf2a628ed220f93f271fd0 (patch) | |
tree | 498553279ed6966d188c486ebc11205518f09a0c /logic/minecraft/onesix/OneSixProfileStrategy.cpp | |
parent | 9e3534f2f6d60dc4c1b14ebaa748c0cb26638a4c (diff) | |
download | MultiMC-ec6204e447fd9e88b4cf2a628ed220f93f271fd0.tar MultiMC-ec6204e447fd9e88b4cf2a628ed220f93f271fd0.tar.gz MultiMC-ec6204e447fd9e88b4cf2a628ed220f93f271fd0.tar.lz MultiMC-ec6204e447fd9e88b4cf2a628ed220f93f271fd0.tar.xz MultiMC-ec6204e447fd9e88b4cf2a628ed220f93f271fd0.zip |
NOISSUE share logic for new attributes between mojang and onesix format
Diffstat (limited to 'logic/minecraft/onesix/OneSixProfileStrategy.cpp')
-rw-r--r-- | logic/minecraft/onesix/OneSixProfileStrategy.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/logic/minecraft/onesix/OneSixProfileStrategy.cpp b/logic/minecraft/onesix/OneSixProfileStrategy.cpp index 3ae055c0..aaaa9d97 100644 --- a/logic/minecraft/onesix/OneSixProfileStrategy.cpp +++ b/logic/minecraft/onesix/OneSixProfileStrategy.cpp @@ -56,7 +56,7 @@ void OneSixProfileStrategy::upgradeDeprecatedFiles() file->fileId = "net.minecraft"; file->version = file->id; file->name = "Minecraft"; - auto data = OneSixVersionFormat::profilePatchToJson(file, false).toJson(); + auto data = OneSixVersionFormat::versionFileToJson(file, false).toJson(); QSaveFile newPatchFile(mcJson); if(!newPatchFile.open(QIODevice::WriteOnly)) { @@ -299,7 +299,12 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch) { return false; } - auto document = OneSixVersionFormat::profilePatchToJson(patch, true); + auto vfile = patch->getVersionFile(); + if(!vfile) + { + return false; + } + auto document = OneSixVersionFormat::versionFileToJson(vfile, true); jsonFile.write(document.toJson()); if(!jsonFile.commit()) { @@ -402,7 +407,7 @@ bool OneSixProfileStrategy::installJarMods(QStringList filepaths) << "for reading:" << file.errorString(); return false; } - file.write(OneSixVersionFormat::profilePatchToJson(f, true).toJson()); + file.write(OneSixVersionFormat::versionFileToJson(f, true).toJson()); file.close(); profile->appendPatch(f); } |