Examples of tryAddStacksCopy()


Examples of forestry.core.utils.InventoryAdapter.tryAddStacksCopy()

  public boolean canReceivePayment() {
    InventoryAdapter test = inventory.copy();
    ItemStack [] payment = inventory.getStacks(SLOT_EXCHANGE_1, SLOT_EXCHANGE_COUNT);

    return test.tryAddStacksCopy(payment, SLOT_RECEIVE_BUFFER, SLOT_RECEIVE_BUFFER_COUNT, true);
  }

  private int countStorablePayment(int max, ItemStack[] exchange) {
   
    InventoryAdapter test = inventory.copy();
View Full Code Here

Examples of forestry.core.utils.InventoryAdapter.tryAddStacksCopy()

   
    InventoryAdapter test = inventory.copy();
    int count = 0;

    for (int i = 0; i < max; i++) {
      if (test.tryAddStacksCopy(exchange, SLOT_RECEIVE_BUFFER, SLOT_RECEIVE_BUFFER_COUNT, true))
        count++;
      else
        break;
    }
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.