Paper/patches/server/0920-Fix-text-display-error-on-spawn.patch
Jake Potrebic 0cdce89d59
Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset
to the main world spawn point
2023-11-04 14:11:55 -07:00

20 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
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 355800fe33a24b47379a14139711459a54e90c5a..ec4325b90b5707e97927b95064ef4dd840b2a538 100644
--- a/src/main/java/net/minecraft/world/entity/Display.java
+++ b/src/main/java/net/minecraft/world/entity/Display.java
@@ -862,7 +862,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<Display.TextDisplay.Align> optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).resultOrPartial(Util.prefix("Display entity", Display.LOGGER::error)).map(Pair::getFirst);
+ Optional<Display.TextDisplay.Align> optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).result().map(Pair::getFirst); // Paper - hide error message
if (optional.isPresent()) {
byte var10000;
switch ((Display.TextDisplay.Align)optional.get()) {