From 3a6f890774da08843e912760773a12812d78aac8 Mon Sep 17 00:00:00 2001 From: abel1502 Date: Thu, 22 May 2025 18:43:13 +0300 Subject: [PATCH] Fix dupe --- .../hbm/tileentity/network/TileEntityCraneExtractor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java b/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java index f539271cb..2ce576e1f 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java @@ -127,7 +127,12 @@ public class TileEntityCraneExtractor extends TileEntityCraneBase implements IGU worldObj.spawnEntityInWorld(moving); if (b instanceof IEnterableBlock) { - ((IEnterableBlock)b).onItemEnter(worldObj, xCoord + outputSide.offsetX, yCoord + outputSide.offsetY, zCoord + outputSide.offsetZ, outputSide, moving); + IEnterableBlock enterable = (IEnterableBlock) b; + + if(enterable.canItemEnter(worldObj, xCoord + outputSide.offsetX, yCoord + outputSide.offsetY, zCoord + outputSide.offsetZ, outputSide, moving)) { + enterable.onItemEnter(worldObj, xCoord + outputSide.offsetX, yCoord + outputSide.offsetY, zCoord + outputSide.offsetZ, outputSide, moving); + moving.setDead(); + } } hasSent = true;