Examples of splitStack()


Examples of net.minecraft.item.ItemStack.splitStack()

    ItemStack stack = funnel.getStackInSlot(0);

    if (stack == null) {
      ItemStack playerStack = par5EntityPlayer.getCurrentEquippedItem();
      if (funnel.canInsertItem(0, playerStack, 1)) {
        funnel.setInventorySlotContents(0, playerStack.splitStack(1));

        if (playerStack.stackSize <= 0)
          par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
        funnel.markDirty();
        return true;
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

    ItemStack stack = repairer.getStackInSlot(0);

    if (stack == null) {
      ItemStack playerStack = par5EntityPlayer.getCurrentEquippedItem();
      if (repairer.canInsertItem(0, playerStack, 1)) {
        repairer.setInventorySlotContents(0, playerStack.splitStack(1));

        if (playerStack.stackSize <= 0)
          par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);

        repairer.markDirty();
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

                if (l1 > slot2.getSlotStackLimit()) {
                  l1 = slot2.getSlotStackLimit();
                }
                if (itemstack4.stackSize >= l1) {
                  slot2.putStack(itemstack4.splitStack(l1));
                }
                if (itemstack4.stackSize == 0) {
                  inventoryPlayer.setItemStack((ItemStack) null);
                }
              }
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

                    l1 = slot2.getSlotStackLimit() - itemstack3.stackSize;
                  }
                  if (l1 > itemstack4.getMaxStackSize() - itemstack3.stackSize) {
                    l1 = itemstack4.getMaxStackSize() - itemstack3.stackSize;
                  }
                  itemstack4.splitStack(l1);

                  if (itemstack4.stackSize == 0) {
                    inventoryPlayer.setItemStack((ItemStack) null);
                  }
                  itemstack3.stackSize += l1;
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

        this.onInventoryChanged();
        return itemstack;
      } else
      {
        ItemStack temp = slots.get(i);
        itemstack = temp.splitStack(j);
        slots.set(i, temp);
        if (temp.stackSize == 0)
        {
          slots.set(i, null);
        } else
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

                if(l1 > slot2.getSlotStackLimit()) {
                  l1 = slot2.getSlotStackLimit();
                }
               
                if(itemstack4.stackSize >= l1) {
                  slot2.putStack(itemstack4.splitStack(l1));
                }
               
                if(itemstack4.stackSize == 0) {
                  inventoryplayer.setItemStack((ItemStack)null);
                }
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

                 
                  if(l1 > itemstack4.getMaxStackSize() - itemstack3.stackSize) {
                    l1 = itemstack4.getMaxStackSize() - itemstack3.stackSize;
                  }
                 
                  itemstack4.splitStack(l1);
                 
                  if(itemstack4.stackSize == 0) {
                    inventoryplayer.setItemStack((ItemStack)null);
                  }
                 
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

            {
                setInventorySlotContents(slotIndex, null);
            }
            else
            {
                itemStack = itemStack.splitStack(decrementAmount);
                if (itemStack.stackSize == 0)
                {
                    setInventorySlotContents(slotIndex, null);
                }
            }
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

            {
                setInventorySlotContents(slotIndex, null);
            }
            else
            {
                itemStack = itemStack.splitStack(decrementAmount);
                if (itemStack.stackSize == 0)
                {
                    setInventorySlotContents(slotIndex, null);
                }
            }
View Full Code Here

Examples of net.minecraft.item.ItemStack.splitStack()

            {
                setInventorySlotContents(slotIndex, null);
            }
            else
            {
                itemStack = itemStack.splitStack(decrementAmount);
                if (itemStack.stackSize == 0)
                {
                    setInventorySlotContents(slotIndex, null);
                }
            }
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.