Examples of roomForItem()


Examples of logisticspipes.interfaces.IInventoryUtil.roomForItem()

    if (bestresult == null) return null;
    //Always deny items when we can't put the item anywhere
    IInventoryUtil invUtil = _parentPipe.getSneakyInventory(false);
    if (invUtil == null) return null;
    int roomForItem = invUtil.roomForItem(item);
    if (roomForItem < 1) return null;
    if(includeInTransit) {
      int onRoute = _parentPipe.countOnRoute(item);
      roomForItem = invUtil.roomForItem(item, onRoute + item.getMaxStackSize());
      roomForItem -= onRoute;
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.roomForItem()

    if (invUtil == null) return null;
    int roomForItem = invUtil.roomForItem(item);
    if (roomForItem < 1) return null;
    if(includeInTransit) {
      int onRoute = _parentPipe.countOnRoute(item);
      roomForItem = invUtil.roomForItem(item, onRoute + item.getMaxStackSize());
      roomForItem -= onRoute;
      if (roomForItem < 1) return null;
    }

    if(bestresult.maxNumberOfItems == 0) {
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.roomForItem()

      IInventory base = (IInventory) tile.tile;
      if (base instanceof net.minecraft.inventory.ISidedInventory) {
        base = new SidedInventoryMinecraftAdapter((net.minecraft.inventory.ISidedInventory) base, tile.orientation.getOpposite(),false);
      }
      IInventoryUtil inv =SimpleServiceLocator.inventoryUtilFactory.getInventoryUtil(base);
      count += inv.roomForItem(item, 9999);
    }
    if(includeInTransit) {
      count -= pipe.countOnRoute(item);
    }
    return count;
View Full Code Here

Examples of logisticspipes.interfaces.IInventoryUtil.roomForItem()

      IInventory base = (IInventory)tile.tile;
      if(base instanceof net.minecraft.inventory.ISidedInventory) {
        base = new SidedInventoryMinecraftAdapter((net.minecraft.inventory.ISidedInventory)base, tile.orientation.getOpposite(), false);
      }
      IInventoryUtil inv = SimpleServiceLocator.inventoryUtilFactory.getInventoryUtil(base);
      count += inv.roomForItem(item, 9999);
    }
    if(includeInTransit) {
      count -= _service.countOnRoute(item);
    }
    return count;
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.