Skip to content

Commit

Permalink
Fix Miner Pipe Deleting TileEntities (#2529)
Browse files Browse the repository at this point in the history
(cherry picked from commit dd6f3e3)
  • Loading branch information
ghzdude authored and TechLord22 committed Jul 10, 2024
1 parent 135982d commit 071a3dc
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 071a3dc

Please sign in to comment.