diff options
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Machines.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index e1c11e05df..36d32bca6d 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -372,7 +372,22 @@ public class GT_Block_Machines }
return mTemporaryTileEntity.get() == null ? new ArrayList() : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops();
}
+ @Override
+ public boolean removedByPlayer(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, boolean aWillHarvest) {
+ if (aWillHarvest) {
+ return true; // This delays deletion of the block until after getDrops
+ } else {
+ return super.removedByPlayer(aWorld, aPlayer, aX, aY, aZ, false);
+ }
+ }
+ @Override
+ public void harvestBlock(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, int aMeta)
+ {
+ super.harvestBlock(aWorld, aPlayer, aX, aY, aZ, aMeta);
+ aWorld.setBlockToAir(aX, aY, aZ);
+ }
+
public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (((tTileEntity instanceof IGregTechTileEntity))) {
|