1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-28 03:09:08 +00:00

BannerTranslator: fix NPE when no block entity data (#1543)

This commit is contained in:
Camotoy
2020-11-15 18:48:11 -05:00
committed by GitHub
parent 981ac3bf11
commit 47f25f1205

View File

@@ -130,7 +130,7 @@ public class BannerTranslator extends ItemTranslator {
ItemData itemData = super.translateToBedrock(itemStack, itemEntry);
CompoundTag blockEntityTag = itemStack.getNbt().get("BlockEntityTag");
if (blockEntityTag.contains("Patterns")) {
if (blockEntityTag != null && blockEntityTag.contains("Patterns")) {
ListTag patterns = blockEntityTag.get("Patterns");
NbtMapBuilder builder = itemData.getTag().toBuilder();