Package forestry.core.inventory.manipulators

Examples of forestry.core.inventory.manipulators.InventoryManipulator


   * @param dest
   * @param filer an IItemType to match against
   * @return null if nothing was moved, the stack moved otherwise
   */
  public static ItemStack moveOneItem(IInventory source, IInventory dest, IStackFilter filter) {
    InventoryManipulator imSource = InventoryManipulator.get(source);
    return imSource.moveItem(dest, filter);
  }
View Full Code Here


   * @param dest The destination IInventory.
   * @return Null if itemStack was completely moved, a new itemStack with
   * remaining stackSize if part or none of the stack was moved.
   */
  public static ItemStack moveItemStack(ItemStack stack, IInventory dest) {
    InventoryManipulator im = InventoryManipulator.get(dest);
    return im.addStack(stack);
  }
View Full Code Here

   * @return true if room for stack
   */
  public static boolean isRoomForStack(ItemStack stack, IInventory dest) {
    if (stack == null || dest == null)
      return false;
    InventoryManipulator im = InventoryManipulator.get(dest);
    return im.canAddStack(stack);
  }
View Full Code Here

   * @param inv The inventory
   * @param filter EnumItemType to match against
   * @return An ItemStack
   */
  public static ItemStack removeOneItem(IInventory inv, IStackFilter filter) {
    InventoryManipulator im = InventoryManipulator.get(inv);
    return im.removeItem(filter);
  }
View Full Code Here

TOP

Related Classes of forestry.core.inventory.manipulators.InventoryManipulator

Copyright © 2018 www.massapicom. 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.