Revert "fix gate dupe bug, rewrite quarry logic"

This reverts commit 485e214f66.
This commit is contained in:
asiekierka 2015-01-03 13:38:27 +01:00
parent 2b0885ccda
commit bb9a62bcc2
2 changed files with 16 additions and 17 deletions

View file

@ -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

View file

@ -433,6 +433,12 @@ public abstract class Pipe<T extends PipeTransport> 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)) {