Skip to content

Commit ae6507f

Browse files
committed
fix strings deserialization from json
1 parent 77d4b9c commit ae6507f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- a/net/minecraft/util/datafix/fixes/UnflattenTextComponentFix.java
2+
+++ b/net/minecraft/util/datafix/fixes/UnflattenTextComponentFix.java
3+
@@ -44,6 +_,10 @@
4+
return new Dynamic<>(ops, JsonOps.INSTANCE.convertTo(ops, jsonElement));
5+
}
6+
} catch (Exception var3) {
7+
+ if (!json.startsWith("\"") && !json.endsWith("\"")) {
8+
+ json = "\"" + json + "\"";
9+
+ return unflattenJson(ops, json);
10+
+ }
11+
LOGGER.error("Failed to unflatten text component json: {}", json, var3);
12+
}
13+

0 commit comments

Comments
 (0)