Examples of splitStack()


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

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

                    Integer availableWidgets = dronePieces.get(availableWidget);
                    if(availableWidgets > requiredWidget) {
                        ItemStack stack = ItemProgrammingPuzzle.getStackForWidgetKey(availableWidget);
                        stack.stackSize = (availableWidgets - requiredWidget) * inventory[PROGRAM_SLOT].stackSize;
                        while(stack.stackSize > stack.getMaxStackSize()) {
                            stacks.add(stack.splitStack(stack.getMaxStackSize()));
                        }
                        stacks.add(stack);
                    }
                } else {
                    ItemStack stack = ItemProgrammingPuzzle.getStackForWidgetKey(availableWidget);
View Full Code Here

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

                    }
                } else {
                    ItemStack stack = ItemProgrammingPuzzle.getStackForWidgetKey(availableWidget);
                    stack.stackSize = dronePieces.get(availableWidget) * inventory[PROGRAM_SLOT].stackSize;
                    while(stack.stackSize > stack.getMaxStackSize()) {
                        stacks.add(stack.splitStack(stack.getMaxStackSize()));
                    }
                    stacks.add(stack);
                }
            }
        }
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

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

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

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

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

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

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.