From bb9a62bcc290f2d370edbf481a00e5ae59afe682 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sat, 3 Jan 2015 13:38:27 +0100 Subject: [PATCH] Revert "fix gate dupe bug, rewrite quarry logic" This reverts commit 485e214f66de37f414d416ef52ef0e933056c4d4. --- common/buildcraft/factory/TileQuarry.java | 27 +++++++++-------------- common/buildcraft/transport/Pipe.java | 6 +++++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index 7af23976..e89fd445 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -301,7 +301,8 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI if (!columnVisitListIsUpdated) { // nextTarget may not be accurate, at least search the target column for changes for (int y = nextTarget[1] + 1; y < yCoord + 3; y++) { Block block = worldObj.getBlock(nextTarget[0], y, nextTarget[2]); - if (BlockUtils.isAnObstructingBlock(block, worldObj, nextTarget[0], y, nextTarget[2])) { + if (BlockUtils.isAnObstructingBlock(block, worldObj, nextTarget[0], y, nextTarget[2]) + || !BuildCraftAPI.isSoftBlock(worldObj, nextTarget[0], y, nextTarget[2])) { createColumnVisitList(); columnVisitListIsUpdated = true; nextTarget = null; @@ -373,15 +374,14 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI if (!BlockUtils.canChangeBlock(block, worldObj, bx, by, bz)) { blockedColumns[searchX][searchZ] = true; - - if (height == 0) { - columnHeights[searchX][searchZ] = by; - } - - } else if (BlockUtils.isAnObstructingBlock(block, worldObj, bx, by, bz)) { + } else if (!BuildCraftAPI.isSoftBlock(worldObj, bx, by, bz)) { visitList.add(new int[]{bx, by, bz}); } + if (height == 0 && !worldObj.isAirBlock(bx, by, bz)) { + columnHeights[searchX][searchZ] = by; + } + // Stop at two planes - generally any obstructions will have been found and will force a recompute prior to this if (visitList.size() > builder.blueprint.sizeZ * builder.blueprint.sizeX * 2) { @@ -464,14 +464,8 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI } if (isQuarriableBlock(targetX, targetY - 1, targetZ)) { - if (BuildCraftAPI.isSoftBlock(worldObj, targetX, targetY - 1, targetZ)) { - miner = null; - stage = Stage.IDLE; - worldObj.setBlockToAir(targetX, targetY - 1, targetZ); - } else { - miner = new BlockMiner(worldObj, this, targetX, targetY - 1, targetZ); - stage = Stage.DIGGING; - } + miner = new BlockMiner(worldObj, this, targetX, targetY - 1, targetZ); + stage = Stage.DIGGING; } else { stage = Stage.IDLE; } @@ -480,8 +474,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI private boolean isQuarriableBlock(int bx, int by, int bz) { Block block = worldObj.getBlock(bx, by, bz); return BlockUtils.canChangeBlock(block, worldObj, bx, by, bz) - && BlockUtils.isAnObstructingBlock(block, worldObj, bx, by, bz); - // && !BuildCraftAPI.isSoftBlock(worldObj, bx, by, bz); + && !BuildCraftAPI.isSoftBlock(worldObj, bx, by, bz); } @Override diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 26aec023..04305117 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -433,6 +433,12 @@ public abstract class Pipe implements IDropControlInven } } + for (Gate gate : gates) { + if (gate != null) { + result.add(gate.getGateItem()); + } + } + for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { if (container.hasPipePluggable(direction)) { for (ItemStack stack : container.getPipePluggable(direction).getDropItems(container)) {