Examples of ISidedInventory


Examples of net.minecraft.inventory.ISidedInventory

    if (inventory == null) {
      return null;
    }

    // Handle possible double chests and wrap it in the ISidedInventory interface.
    ISidedInventory sidedInventory = InventoryWrapper.getWrappedInventory(InvUtils.getInventory(inventory));

    if (settings.getFilterMode() == FilterMode.ROUND_ROBIN) {
      return checkExtractRoundRobin(sidedInventory, doRemove, from);
    }
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory

    }

    public static ItemStack extract(IInventory inventory, ForgeDirection direction, boolean simulate){

        if(inventory instanceof ISidedInventory) {
            ISidedInventory isidedinventory = (ISidedInventory)inventory;
            int[] accessibleSlotsFromSide = isidedinventory.getAccessibleSlotsFromSide(direction.ordinal());

            for(int anAccessibleSlotsFromSide : accessibleSlotsFromSide) {
                ItemStack stack = extract(inventory, direction, anAccessibleSlotsFromSide, simulate);
                if(stack != null) return stack;
            }
View Full Code Here

Examples of net.minecraft.inventory.ISidedInventory

    }

    public static ItemStack insert(IInventory inventory, ItemStack itemStack, int side, boolean simulate){

        if(inventory instanceof ISidedInventory && side > -1) {
            ISidedInventory isidedinventory = (ISidedInventory)inventory;
            int[] aint = isidedinventory.getAccessibleSlotsFromSide(side);

            for(int j = 0; j < aint.length && itemStack != null && itemStack.stackSize > 0; ++j) {
                itemStack = insert(inventory, itemStack, aint[j], side, simulate);
            }
        } else {
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.