From c5e02d28e6adedeffcad6c2b2d4dddc4c8602bee Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Sun, 21 Apr 2024 23:48:30 +0200 Subject: [PATCH] ensure geyser builds --- .../java/org/geysermc/geyser/inventory/AnvilContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/inventory/AnvilContainer.java b/core/src/main/java/org/geysermc/geyser/inventory/AnvilContainer.java index 3c7b7e4bd..1c5826cdb 100644 --- a/core/src/main/java/org/geysermc/geyser/inventory/AnvilContainer.java +++ b/core/src/main/java/org/geysermc/geyser/inventory/AnvilContainer.java @@ -29,7 +29,6 @@ import com.github.steveice10.mc.protocol.data.game.inventory.ContainerType; import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundRenameItemPacket; import lombok.Getter; import lombok.Setter; -import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.Nullable; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.text.MessageTranslator; @@ -73,7 +72,8 @@ public class AnvilContainer extends Container { String correctRename; newName = rename; - Component originalName = ItemUtils.getCustomName(getInput().getComponents()); + // TODO 1.20.5 fix properly - this name is apparently nullable?? + String originalName = MessageTranslator.convertMessage(ItemUtils.getCustomName(getInput().getComponents())); String plainOriginalName = MessageTranslator.convertToPlainTextLenient(originalName, session.locale()); String plainNewName = MessageTranslator.convertToPlainText(rename);