Package net.mcft.copy.betterstorage.api.crafting

Examples of net.mcft.copy.betterstorage.api.crafting.IRecipeInput.matches()


      if (required != null) {
        int currentAmount = 0;
        if ((stack != null) && simulate)
          stack = craftSlot(stack, required, null, true);
        if (stack != null) {
          if (!required.matches(stack)) return false;
          currentAmount = stack.stackSize;
        }
        int requiredAmount = (required.getAmount() - currentAmount);
        if (requiredAmount <= 0) continue;
        for (int j = 0; j < contents.length; j++) {
View Full Code Here


        int requiredAmount = (required.getAmount() - currentAmount);
        if (requiredAmount <= 0) continue;
        for (int j = 0; j < contents.length; j++) {
          ItemStack contentsStack = contents[j];
          if (contentsStack == null) continue;
          if ((stack == null) ? required.matches(contentsStack)
                              : StackUtils.matches(stack, contentsStack)) {
            int amount = Math.min(contentsStack.stackSize, requiredAmount);
            crafting[i] = stack = StackUtils.copyStack(contentsStack, (currentAmount += amount));
            contents[j] =         StackUtils.copyStack(contentsStack, contentsStack.stackSize - amount);
            if ((requiredAmount -= amount) <= 0)
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.