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:
parent
1261908ef7
commit
7a7c3015f4
@ -209,14 +209,8 @@ bool processMCMeta(ResourcePack& pack, QByteArray&& raw_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto obj = dict.toObject();
|
auto obj = dict.toObject();
|
||||||
auto val = obj.value(obj.keys()[0]);
|
|
||||||
|
|
||||||
if (!val.isString()) {
|
build_desc.append(Json::ensureString(obj, "text", {}));
|
||||||
qWarning() << "Invalid text description type in components.";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
build_desc.append(val.toString());
|
|
||||||
};
|
};
|
||||||
pack.setDescription(build_desc);
|
pack.setDescription(build_desc);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user