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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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);