Only route items when pipe is connected.

Will no longer send items to a pipe that does not allow the connection.
This commit is contained in:
Xhamolk 2012-10-05 10:01:50 -06:00
parent 569fde6e0c
commit db09ffe65f

View file

@ -148,8 +148,12 @@ public class Utils {
TileEntity pipeEntry = w.getBlockTileEntity((int) pos.x, (int) pos.y, (int) pos.z);
if (pipeEntry instanceof IPipeEntry && ((IPipeEntry) pipeEntry).acceptItems())
if (pipeEntry instanceof IPipeEntry && ((IPipeEntry) pipeEntry).acceptItems()) {
if( pipeEntry instanceof IPipeConnection )
if( !((IPipeConnection) pipeEntry).isPipeConnected(from.reverse()) )
continue;
possiblePipes.add(Orientations.values()[j]);
}
}
if (possiblePipes.size() > 0) {