From 1c0ea9c60cda1deece7ed2c9d4f54a36d9217aa9 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 18 Apr 2020 10:29:13 +0200 Subject: [PATCH] fix npe --- .../connector/entity/living/monster/ShulkerEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/entity/living/monster/ShulkerEntity.java b/connector/src/main/java/org/geysermc/connector/entity/living/monster/ShulkerEntity.java index a3a175b82..6ec8fdfc9 100644 --- a/connector/src/main/java/org/geysermc/connector/entity/living/monster/ShulkerEntity.java +++ b/connector/src/main/java/org/geysermc/connector/entity/living/monster/ShulkerEntity.java @@ -49,7 +49,9 @@ public class ShulkerEntity extends GolemEntity { } if (entityMetadata.getId() == 16) { Position position = (Position) entityMetadata.getValue(); - metadata.put(EntityData.SHULKER_ATTACH_POS, Vector3i.from(position.getX(), position.getY(), position.getZ())); + if(position != null){ + metadata.put(EntityData.SHULKER_ATTACH_POS, Vector3i.from(position.getX(), position.getY(), position.getZ())); + } } //TODO Outdated metadata flag SHULKER_PEAK_HEIGHT // if (entityMetadata.getId() == 17) {