From bdc7af573d75218f08be52660902950f446e93e3 Mon Sep 17 00:00:00 2001 From: Eldrinn-Elantey <46845681+Eldrinn-Elantey@users.noreply.github.com> Date: Thu, 17 Sep 2026 22:55:57 +0400 Subject: [PATCH] Ignore grave interactions from a dead player A player who empties a grave in the same tick they die loses the items. The server has already collected their drops, the grave turns to air, and respawn wipes the inventory they just filled. --- .../java/openblocks/common/tileentity/TileEntityGrave.java | 4 ++++ 1 file changed, 4 insertions(+) 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);