Wooden Pipes shouldn't orient to pipes

Closes #1218
This commit is contained in:
CovertJaguar 2013-09-24 10:17:21 -07:00
parent 93290e0ad9
commit 3c84c34bd9
2 changed files with 6 additions and 2 deletions

View file

@ -13,8 +13,8 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
import buildcraft.api.transport.IPipeTile;
import buildcraft.api.transport.PipeManager;
import buildcraft.core.TileBuffer;
import buildcraft.core.network.TileNetworkData;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
@ -41,6 +41,8 @@ public class PipeFluidsWood extends Pipe<PipeTransportFluids> implements IPowerR
private PipeLogicWood logic = new PipeLogicWood(this) {
@Override
protected boolean isValidConnectingTile(TileEntity tile) {
if(tile instanceof IPipeTile)
return false;
if (!(tile instanceof IFluidHandler))
return false;
if (!PipeManager.canExtractFluids(pipe, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord))

View file

@ -15,8 +15,8 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
import buildcraft.api.transport.IPipeTile;
import buildcraft.api.transport.PipeManager;
import buildcraft.core.TileBuffer;
import buildcraft.transport.TravelingItem;
import buildcraft.core.inventory.InventoryWrapper;
import buildcraft.core.utils.Utils;
@ -40,6 +40,8 @@ public class PipeItemsWood extends Pipe<PipeTransportItems> implements IPowerRec
private PipeLogicWood logic = new PipeLogicWood(this) {
@Override
protected boolean isValidConnectingTile(TileEntity tile) {
if (tile instanceof IPipeTile)
return false;
if (!(tile instanceof IInventory))
return false;
if (!PipeManager.canExtractItems(pipe, tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord))