From 071a3dc57348addec33fc0d5f3cf36bfaaadb894 Mon Sep 17 00:00:00 2001 From: Ghzdude <44148655+ghzdude@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:44:27 -0700 Subject: [PATCH] Fix Miner Pipe Deleting TileEntities (#2529) (cherry picked from commit dd6f3e3a247548daa6d6615683744f79feb4431a) --- .../java/gregtech/api/capability/impl/miner/MinerLogic.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/capability/impl/miner/MinerLogic.java b/src/main/java/gregtech/api/capability/impl/miner/MinerLogic.java index 5b1ca454f3d..3439aca4a57 100644 --- a/src/main/java/gregtech/api/capability/impl/miner/MinerLogic.java +++ b/src/main/java/gregtech/api/capability/impl/miner/MinerLogic.java @@ -157,8 +157,10 @@ public void performMining() { // drill a hole beneath the miner and extend the pipe downwards by one WorldServer world = (WorldServer) metaTileEntity.getWorld(); if (mineY.get() < pipeY.get()) { - world.destroyBlock( - new BlockPos(metaTileEntity.getPos().getX(), pipeY.get(), metaTileEntity.getPos().getZ()), false); + var pipePos = new BlockPos(metaTileEntity.getPos().getX(), pipeY.get(), metaTileEntity.getPos().getZ()); + if (world.getTileEntity(pipePos) == null && + world.getBlockState(pipePos).getBlockHardness(world, pipePos) >= 0) + world.destroyBlock(pipePos, false); pipeY.decrementAndGet(); incrementPipeLength(); }