Skip to content

Commit

Permalink
Fix Miner Pipe Deleting TileEntities (GregTechCEu#2529)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude authored Jul 7, 2024
1 parent f149a18 commit dd6f3e3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit dd6f3e3

Please sign in to comment.