protected int stacksToExtract() {
return 1;
}
private int sendStack(ItemIdentifierStack stack, int maxCount, int destination, IAdditionalTargetInformation info) {
ItemIdentifier item = stack.getItem();
WorldUtil wUtil = new WorldUtil(getWorld(), getX(), getY(), getZ());
for (AdjacentTile tile : wUtil.getAdjacentTileEntities(true)){
if (!(tile.tile instanceof IInventory)) continue;
if (SimpleServiceLocator.pipeInformaitonManager.isPipe(tile.tile)) continue;
IInventoryUtil inv = getAdaptedInventoryUtil(tile);
int available = inv.itemCount(item);
if (available == 0) continue;
int wanted = Math.min(available, stack.getStackSize());
wanted = Math.min(wanted, maxCount);
wanted = Math.min(wanted, item.getMaxStackSize());
IRouter dRtr = SimpleServiceLocator.routerManager.getRouterUnsafe(destination,false);
if(dRtr == null) {
_orderManager.sendFailed();
return 0;
}