Examples of ItemIdentifier


Examples of net.mcft.copy.betterstorage.misc.ItemIdentifier

 
  @Override
  public void onCrateItemsModified(ItemStack changed) {
    if (ignoreModifiedItems) return;
   
    ItemIdentifier item = new ItemIdentifier(changed);
    int amount = changed.stackSize;
   
    MapData itemData = getMapData(item);
    Queue<Integer> emptySlots = new LinkedList<Integer>();
   
    for (int slot = 0; slot < tempContents.length; slot++) {
      ItemStack stack = tempContents[slot];
      if (stack == null) { emptySlots.add(slot); continue; }
      if (!item.matches(stack)) continue;
      amount -= modifyItemsInSlot(slot, stack, itemData, amount);
      if (amount == 0) return;
    }
   
    while ((amount > 0) && (emptySlots.size() > 0))
View Full Code Here

Examples of net.mcft.copy.betterstorage.misc.ItemIdentifier

      if (tempContents[s] == null) emptySlots++;
   
    if (emptySlots <= data.getFreeSlots()) return;
   
    for (ItemStack stack : data.getContents().getItems()) {
      ItemIdentifier item = new ItemIdentifier(stack);
      MapData itemData = getMapData(item);
     
      int count = (stack.stackSize - itemData.itemCount);
      if (count <= 0) continue;
      setItemsInSlot(slot, item, itemData, count);
View Full Code Here

Examples of net.mcft.copy.betterstorage.misc.ItemIdentifier

    if (stack == null) return null;
    amount = Math.min(amount, stack.stackSize);
    if (stack.stackSize <= amount) originalStacks[slot - 1] = exposedStacks[slot - 1] = null;
    else originalStacks[slot - 1].stackSize = exposedStacks[slot - 1].stackSize -= amount;
    isModifying = true;
    ItemStack result = data.removeItems(new ItemIdentifier(stack), amount);
    isModifying = false;
    return result;
  }
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.