From eddf0f40dc9022cf233295eba7fe7132a61b8141 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 14 Jun 2021 02:15:37 -0700 Subject: [PATCH] decomp fixes --- ...0466-Support-old-UUID-format-for-NBT.patch | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/patches/server/0466-Support-old-UUID-format-for-NBT.patch b/patches/server/0466-Support-old-UUID-format-for-NBT.patch index 0418f312a1..9fd9265bf0 100644 --- a/patches/server/0466-Support-old-UUID-format-for-NBT.patch +++ b/patches/server/0466-Support-old-UUID-format-for-NBT.patch @@ -46,7 +46,7 @@ index 1aa3af8c7714b2c850fb4264c863db8e639e6284..2a805d6bbeede50898d36258976ff25e return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4; } diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java -index 57c9575a9714acb95d9dced672955a96d71dfd1e..dc136cd4d5d4ba1e0e53a7187b3a2e836e185c19 100644 +index 57c9575a9714acb95d9dced672955a96d71dfd1e..06fe97e05608fc21f90c9884d745d910beb6883d 100644 --- a/src/main/java/net/minecraft/nbt/NbtUtils.java +++ b/src/main/java/net/minecraft/nbt/NbtUtils.java @@ -40,14 +40,14 @@ import org.apache.logging.log4j.LogManager; @@ -78,3 +78,23 @@ index 57c9575a9714acb95d9dced672955a96d71dfd1e..dc136cd4d5d4ba1e0e53a7187b3a2e83 if (compound.hasUUID("Id")) { uUID = compound.getUUID("Id"); } +@@ -495,7 +500,7 @@ public final class NbtUtils { + } + + public static CompoundTag update(DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion) { +- return fixer.update(fixTypes.getType(), new Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue(); ++ return (CompoundTag) fixer.update(fixTypes.getType(), new com.mojang.serialization.Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue(); // Paper - decompile fix + } + + public static Component toPrettyComponent(Tag element) { +@@ -620,8 +625,8 @@ public final class NbtUtils { + CompoundTag compoundTag2 = new CompoundTag(); + if (i + 2 <= string.length()) { + String string3 = string.substring(i + 1, string.indexOf(125, i)); +- COMMA_SPLITTER.split(string3).forEach((string2) -> { +- List list = COLON_SPLITTER.splitToList(string2); ++ COMMA_SPLITTER.split(string3).forEach(it -> { // Paper - decompile fix ++ List list = COLON_SPLITTER.splitToList(it); // Paper - decompile fix + if (list.size() == 2) { + compoundTag2.putString(list.get(0), list.get(1)); + } else {