Examples of splitStack()


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

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()

                                    k1 = slot2.getSlotStackLimit();
                                }

                                if (itemstack4.stackSize >= k1)
                                {
                                    slot2.putStack(itemstack4.splitStack(k1));
                                }

                                if (itemstack4.stackSize == 0)
                                {
                                    inventoryplayer.setItemStack((ItemStack) null);
View Full Code Here

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

                                    k1 = slot2.getSlotStackLimit();
                                }

                                if (itemstack4.stackSize >= k1)
                                {
                                    slot2.putStack(itemstack4.splitStack(k1));
                                }

                                if (itemstack4.stackSize == 0)
                                {
                                    inventoryplayer.setItemStack((ItemStack) null);
View Full Code Here

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

                                    if (k1 > itemstack4.getMaxStackSize() - itemstack1.stackSize)
                                    {
                                        k1 = itemstack4.getMaxStackSize() - itemstack1.stackSize;
                                    }

                                    itemstack4.splitStack(k1);

                                    if (itemstack4.stackSize == 0)
                                    {
                                        inventoryplayer.setItemStack((ItemStack) null);
                                    }
View Full Code Here

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

        if (distance == 0 || energyUsed / distance / 10 == contained.stackSize) {
          stack = contained;
          CoreProxy.proxy.removeEntity(entity);
        } else {
          stack = contained.splitStack(energyUsed / distance / 10);
        }

        speed = Math.sqrt(item.motionX * item.motionX + item.motionY * item.motionY + item.motionZ * item.motionZ);
        speed = speed / 2F - 0.05;

View Full Code Here

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

        ItemStack itemStack = getStackInSlot(slot);
        if(itemStack != null) {
            if(itemStack.stackSize <= amount) {
                setInventorySlotContents(slot, null);
            } else {
                itemStack = itemStack.splitStack(amount);
                if(itemStack.stackSize == 0) {
                    setInventorySlotContents(slot, 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.