diff --git a/src/main/java/openblocks/common/tileentity/TileEntityGrave.java b/src/main/java/openblocks/common/tileentity/TileEntityGrave.java index fa80163aa..98b809f2e 100644 --- a/src/main/java/openblocks/common/tileentity/TileEntityGrave.java +++ b/src/main/java/openblocks/common/tileentity/TileEntityGrave.java @@ -248,6 +248,9 @@ private void refreshEmptyFlag() { } public void autoEquipAll(EntityPlayer player) { + // items handed to a dying player are lost: his drops are already collected and the inventory + // is discarded on respawn + if (!player.isEntityAlive()) return; int equipped = 0; int toInventory = 0; int leftover = 0; @@ -294,6 +297,7 @@ public void autoEquipAll(EntityPlayer player) { } protected void robGrave(EntityPlayer player, ItemStack held) { + if (!player.isEntityAlive()) return; boolean dropped = false; for (int i = 0; i < inventory.getSizeInventory(); i++) { final ItemStack stack = inventory.getStackInSlot(i);