summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/JarMod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/JarMod.cpp')
-rw-r--r--logic/minecraft/JarMod.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/logic/minecraft/JarMod.cpp b/logic/minecraft/JarMod.cpp
index c7ba58f1..bf711c1f 100644
--- a/logic/minecraft/JarMod.cpp
+++ b/logic/minecraft/JarMod.cpp
@@ -2,7 +2,7 @@
#include "MMCJson.h"
using namespace MMCJson;
-JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename)
+JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename, const QString &originalName)
{
JarmodPtr out(new Jarmod());
if (!libObj.contains("name"))
@@ -11,6 +11,7 @@ JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename)
"contains a jarmod that doesn't have a 'name' field");
}
out->name = libObj.value("name").toString();
+ out->originalName = libObj.value("originalName").toString();
return out;
}
@@ -18,5 +19,9 @@ QJsonObject Jarmod::toJson()
{
QJsonObject out;
writeString(out, "name", name);
+ if(!originalName.isEmpty())
+ {
+ writeString(out, "originalName", originalName);
+ }
return out;
}