for (AdjacentTile tile : adjacentEntities) {
if (SimpleServiceLocator.pipeInformaitonManager.isPipe(tile.tile)) continue;
if (_router.isRoutedExit(tile.orientation)) continue;
if(denyed != null && denyed.equals(tile.orientation)) continue;
CoreRoutedPipe pipe = _router.getPipe();
if(pipe != null) {
if(pipe.isLockedExit(tile.orientation)) {
continue;
}
}
possibleForgeDirection.add(tile.orientation);
}
if (possibleForgeDirection.size() != 0){
return possibleForgeDirection.get(_worldAccess.getRandomInt(possibleForgeDirection.size()));
}
// 2nd prio, deliver to non-routed exit
for (AdjacentTile tile : adjacentEntities){
if (_router.isRoutedExit(tile.orientation)) continue;
CoreRoutedPipe pipe = _router.getPipe();
if(pipe != null) {
if(pipe.isLockedExit(tile.orientation)) {
continue;
}
}
possibleForgeDirection.add(tile.orientation);