fix not properly reading json text.

The text now displays properly in the GUI of Prism.

Signed-off-by: cullvox <cullvox@outlook.com>
This commit is contained in:
cullvox 2023-09-09 20:25:49 -04:00
parent 1261908ef7
commit 7a7c3015f4

View File

@ -209,14 +209,8 @@ bool processMCMeta(ResourcePack& pack, QByteArray&& raw_data)
}
auto obj = dict.toObject();
auto val = obj.value(obj.keys()[0]);
if (!val.isString()) {
qWarning() << "Invalid text description type in components.";
continue;
}
build_desc.append(val.toString());
build_desc.append(Json::ensureString(obj, "text", {}));
};
pack.setDescription(build_desc);
} else {