1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-26 10:19:12 +00:00

Check for display tag when translating anvil contents (#1073)

This commit is contained in:
Camotoy
2020-08-01 12:57:25 -04:00
committed by GitHub
parent 7fc14d8956
commit 07f3d45cc4

View File

@@ -107,7 +107,7 @@ public class AnvilInventoryTranslator extends BlockInventoryTranslator {
if (itemName != null) {
String rename;
NbtMap tag = itemName.getTag();
if (tag != null) {
if (tag != null && tag.containsKey("display")) {
String name = tag.getCompound("display").getString("Name");
try {
Component component = GsonComponentSerializer.gson().deserialize(name);