Skip to content

Commit 071a3dc

Browse files
ghzdudeTechLord22
authored andcommitted
Fix Miner Pipe Deleting TileEntities (#2529)
(cherry picked from commit dd6f3e3)
1 parent 135982d commit 071a3dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/gregtech/api/capability/impl/miner/MinerLogic.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@ public void performMining() {
157157
// drill a hole beneath the miner and extend the pipe downwards by one
158158
WorldServer world = (WorldServer) metaTileEntity.getWorld();
159159
if (mineY.get() < pipeY.get()) {
160-
world.destroyBlock(
161-
new BlockPos(metaTileEntity.getPos().getX(), pipeY.get(), metaTileEntity.getPos().getZ()), false);
160+
var pipePos = new BlockPos(metaTileEntity.getPos().getX(), pipeY.get(), metaTileEntity.getPos().getZ());
161+
if (world.getTileEntity(pipePos) == null &&
162+
world.getBlockState(pipePos).getBlockHardness(world, pipePos) >= 0)
163+
world.destroyBlock(pipePos, false);
162164
pipeY.decrementAndGet();
163165
incrementPipeLength();
164166
}

0 commit comments

Comments
 (0)