From 5a1e1584aab53d52c82c1e0fd2d06efd3388d03f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 16 Mar 2023 16:28:48 +0100 Subject: [PATCH] Fix text display error on spawn Fixes #8984 --- ...0963-Fix-text-display-error-on-spawn.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/0963-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0963-Fix-text-display-error-on-spawn.patch b/patches/server/0963-Fix-text-display-error-on-spawn.patch new file mode 100644 index 0000000000..a486841821 --- /dev/null +++ b/patches/server/0963-Fix-text-display-error-on-spawn.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Thu, 16 Mar 2023 16:27:50 +0100 +Subject: [PATCH] Fix text display error on spawn + + +diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java +index 78c73e5d2d62998518f43bf0e7eaedebd65bab01..a0b556ea2dd6365ad497825fd9c090001a047099 100644 +--- a/src/main/java/net/minecraft/world/entity/Display.java ++++ b/src/main/java/net/minecraft/world/entity/Display.java +@@ -827,7 +827,7 @@ public abstract class Display extends Entity { + byte b = loadFlag((byte)0, nbt, "shadow", (byte)1); + b = loadFlag(b, nbt, "see_through", (byte)2); + b = loadFlag(b, nbt, "default_background", (byte)4); +- Optional optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).resultOrPartial(Util.prefix("Display entity", Display.LOGGER::error)).map(Pair::getFirst); ++ Optional optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).result().map(Pair::getFirst); // Paper + if (optional.isPresent()) { + byte var10000; + switch ((Display.TextDisplay.Align)optional.get()) {