From 13aa9b721172f91832a480b260af0833e761cb3d Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 18 Dec 2021 11:34:20 +1100 Subject: [PATCH] SPIGOT-6778: Block#beakNaturally doesn't drop items in chests By: DerFrZocker --- .../src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 926c7c60ce..da7ee9c9b5 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -470,7 +470,8 @@ public class CraftBlock implements Block { result = true; } - return setTypeAndData(Blocks.AIR.defaultBlockState(), true) && result; + // SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run. + return world.setBlock(position, Blocks.AIR.defaultBlockState(), 3) && result; } @Override