Examples of itemCount()


Examples of de.danet.an.workflow.api.RangeAccess.itemCount()

                reloadBeforeRendering = false;
            }
            if (processesAsModel != null) {
                RangeAccess ra = (RangeAccess)processesAsModel.getWrappedData();
                try {
                    if (ra.itemCount() != processesAsModel.getRowCount()) {
                        processesAsModel = null;
                    }
                } catch (RemoteException e) {
                    processesAsModel = null;
                }
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    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 = this.getAdaptedInventoryUtil(tile);
      count += inv.itemCount(item);
    }
    return count;
  }

  protected int neededEnergy() {
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    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());
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    if (inv == null) {
      _service.getOrderManager().sendFailed();
      return 0;
    }
   
    int available = inv.itemCount(item);
    if (available == 0) {
      _service.getOrderManager().sendFailed();
      return 0;
    }
    int wanted = Math.min(available, stack.getStackSize());
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    IInventoryUtil inv = _service.getPointedInventory(_extractionMode,true);
    if (inv == null) return 0;
   
    if(!filterAllowsItem(item)) return 0;
   
    return inv.itemCount(item);
  }
 
  private boolean hasFilter() {
    return !_filterInventory.isEmpty();
  }
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    return null;
  }
 
  private ItemStack extractFromIInventory(IInventory inv, ItemIdentifier wanteditem, int count){
    IInventoryUtil invUtil = SimpleServiceLocator.inventoryUtilFactory.getInventoryUtil(inv);
    int available = invUtil.itemCount(wanteditem);
    if(available == 0) return null;
    if(!_service.useEnergy(neededEnergy() * Math.min(count, available))) {
      return null;
    }
    return invUtil.getMultipleItems(wanteditem, Math.min(count, available));
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

          wanteditem = item;
        }
      } 
    }
    if(wanteditem == null) return null;
    int available = invUtil.itemCount(wanteditem);
    if(available == 0) return null;
    if(!_service.useEnergy(neededEnergy() * Math.min(64, available))) {
      return null;
    }
    return invUtil.getMultipleItems(wanteditem, Math.min(64, available));
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.itemCount()

    if (targetUtil == null) return null;
   
    if (!_filterInventory.containsItem(item)) return null;
   
    int targetCount = _filterInventory.itemCount(item);
    int haveCount = targetUtil.itemCount(item);
    if (targetCount <= haveCount) return null;
   
    if(_service.canUseEnergy(2)) {
      return new SinkReply(_sinkReply, targetCount - haveCount);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.