Examples of canExtractItem()


Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

    if (inventory instanceof ISidedInventory) {
      ISidedInventory sidedInv = (ISidedInventory) inventory;
      int slots[] = sidedInv.getAccessibleSlotsFromSide(side);
      for (int i = 0; i < slots.length && retStack == null; i++) {
        if (sidedInv.getStackInSlot(i) != null && sidedInv.canExtractItem(i, sidedInv.getStackInSlot(i), side)) {
          retStack = sidedInv.getStackInSlot(i).copy();
          sidedInv.setInventorySlotContents(i, null);
        }
      }
    } else {
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

          }
         
          if(chest.getValue() instanceof ISidedInventory)
          {
            ISidedInventory sided = (ISidedInventory)chest.getValue();
            if(!sided.canExtractItem(stack.getKey(), stack.getValue(), chest.getKey().ordinal()))
            {
              continue;
            }
          }
         
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

            if(current+stack.stackSize <= max)
            {
              ItemStack copy = stack.copy();

              if(sidedInventory.canExtractItem(slotID, copy, ForgeDirection.OPPOSITES[side]))
              {
                ret.appendStack(slotID, copy);
              }
            }
            else {
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

              }
            }
            else {
              ItemStack copy = stack.copy();

              if(sidedInventory.canExtractItem(slotID, copy, ForgeDirection.OPPOSITES[side]))
              {
                copy.stackSize = max-current;
                ret.appendStack(slotID, copy);
              }
            }
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

          if(sidedInventory.getStackInSlot(slotID) != null && id.modifies(sidedInventory.getStackInSlot(slotID)))
          {
            ItemStack toSend = sidedInventory.getStackInSlot(slotID);

            if(sidedInventory.canExtractItem(slotID, toSend, ForgeDirection.OPPOSITES[side]))
            {
              return new InvStack(inventory, slotID, toSend);
            }
          }
        }
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory.canExtractItem()

          if(sidedInventory.getStackInSlot(slotID) != null && sidedInventory.getStackInSlot(slotID).stackSize > 0)
          {
            ItemStack toSend = sidedInventory.getStackInSlot(slotID).copy();
            toSend.stackSize = 1;

            if(sidedInventory.canExtractItem(slotID, toSend, ForgeDirection.OPPOSITES[side]))
            {
              return new InvStack(inventory, slotID, toSend);
            }
          }
        }
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.