Examples of InventoryCopy


Examples of buildcraft.core.inventory.InventoryCopy

      if (fluid != null && builder instanceof TileBuilder && ((TileBuilder) builder).drainBuild(new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME), true)) {
        continue;
      }

      for (IInvSlot slotInv : InventoryIterator.getIterable(new InventoryCopy(builder), ForgeDirection.UNKNOWN)) {
        if (!builder.isBuildingMaterialSlot(slotInv.getIndex())) {
          continue;
        }

        ItemStack invStk = slotInv.getStackInSlot();
View Full Code Here

Examples of buildcraft.core.inventory.InventoryCopy

    }
    return InvUtils.isRoomForStack(output, ForgeDirection.UP, invOutput);
  }

  private void locateAndBindIngredients() {
    internalInventoryCrafting.tempStacks = new InventoryCopy(inv).getItemStacks();
    internalInventoryCrafting.hitCount = new int[internalInventoryCrafting.tempStacks.length];
    ItemStack[] inputSlots = internalInventoryCrafting.tempStacks;

    for (int gridSlot = 0; gridSlot < craftingSlots.getSizeInventory(); gridSlot++) {
      internalInventoryCrafting.bindings[gridSlot] = -1;
View Full Code Here

Examples of buildcraft.core.inventory.InventoryCopy

    ArrayList<ArrayStackFilter> result = new ArrayList<ArrayStackFilter>();

    IInventory inv = robot;

    if (!doRemove) {
      inv = new InventoryCopy(robot);
    }

    InventoryCrafting invCraft = new InventoryCrafting(new Container() {

      @Override
View Full Code Here

Examples of buildcraft.core.inventory.InventoryCopy

  protected ArrayList<ArrayStackFilter> tryCraft() {
    Object[] items = expectedResult.usedItems.toArray();

    ArrayList<ArrayStackFilter> result = new ArrayList<ArrayStackFilter>();

    IInventory inv = new InventoryCopy(robot);

    for (Object tmp : items) {
      if (tmp == null) {
        continue;
      }
View Full Code Here

Examples of mods.railcraft.common.util.inventory.wrappers.InventoryCopy

                }

                if (recipe != null)
                    if (processTime >= PROCESS_TIME) {
                        isWorking = false;
                        IInventory tempInv = new InventoryCopy(invOutput);
                        boolean hasRoom = true;
                        List<ItemStack> outputs = recipe.getRandomizedOuputs();
                        for (ItemStack output : outputs) {
                            output = InvTools.moveItemStack(output, tempInv);
                            if (output != null) {
View Full Code Here

Examples of mods.railcraft.common.util.inventory.wrappers.InventoryCopy

                                setInventorySlotContents(ii, null);
                        }
                    }
                }
        } else if (!cart.isDead && cart.getCartItem() != null) {
            IInventory testInv = new InventoryCopy(this);
            ItemStack cartStack = cart.getCartItem();
            if (cart.hasCustomInventoryName())
                cartStack.setStackDisplayName(cart.getCommandSenderName());
            ItemStack remainder = InvTools.moveItemStack(cartStack.copy(), testInv);
            if (remainder == 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.