Package de.eydamos.backpack.inventory.container

Examples of de.eydamos.backpack.inventory.container.ContainerPickup


        ItemStack backpack = playerSave.getPersonalBackpack();
        if(backpack != null) {
            InventoryPickup inventoryPickup = new InventoryPickup();
            inventoryPickup.setInventoryContent(backpack);

            ContainerPickup container = new ContainerPickup(ItemBackpackBase.getInventory(backpack, entityPlayer), new BackpackSave(backpack));
            boolean hasPickedUp = false;
            for(int i = 0; i < inventoryPickup.getSizeInventory(); i++) {
                ItemStack pickupItemStack = inventoryPickup.getStackInSlot(i);
                if(areStacksEqual(pickupItemStack, itemStack, true)) {
                    hasPickedUp = container.pickupItem(itemStack) || hasPickedUp;
                }
            }

            if(hasPickedUp) {
                container.onContainerClosed(entityPlayer);
            }
        }
    }
View Full Code Here

TOP

Related Classes of de.eydamos.backpack.inventory.container.ContainerPickup

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.