Examples of decrStackSize()


Examples of net.minecraft.inventory.IInventory.decrStackSize()

  public ItemStack decrStackSize(int i, int j) {
    if( !validIndex( i ))
      return null;
    IInventory inv = getInventoryFromIndex( i );
    int slot = getSlotFromIndex( i );
    return inv.decrStackSize( slot, j );
  }

  @Override
  public ItemStack getStackInSlotOnClosing(int i) {
    if( !validIndex( i ))
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

  @Override
  public ItemStack decrStackSize(int slotIndex, int amount) {
    IInventory inv = getStructureInventory();
    if (inv != null)
      return inv.decrStackSize(slotIndex, amount);
    else
      return null;
  }

  @Override
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

        continue;

      ItemStack stack = inv.getStackInSlot(i);

      if (doRemove)
        product = inv.decrStackSize(i, 1);
      else {
        product = stack.copy();
        product.stackSize = 1;
      }
      break;
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

  @Override
  public ItemStack decrStackSize(int slotIndex, int amount) {
    IInventory inv = getStructureInventory();
    if (inv != null)
      return inv.decrStackSize(slotIndex, amount);
    else
      return null;
  }

  @Override
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

        continue;

      ItemStack stack = inv.getStackInSlot(i);

      if (doRemove)
        product = inv.decrStackSize(i, 1);
      else {
        product = stack.copy();
        product.stackSize = 1;
      }
      break;
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

    @Override
    public ItemStack decrStackSize(int i, int j)
    {
      IInventory inv = getCellUpgradeInventory();
      ItemStack is = inv.decrStackSize( i, j );
      inv.markDirty();
      return is;
    }

    @Override
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

                                IInventory inv = (IInventory)tile;
                                boolean extracted = false;
                                for(int i = 0; i < inv.getSizeInventory(); i++) {
                                    if(inv.getStackInSlot(i) != null && inv.getStackInSlot(i).isItemEqual(searchedItemStack)) {
                                        if(inventory[0] == null) {
                                            inventory[0] = inv.decrStackSize(i, 1);
                                        } else {
                                            inv.decrStackSize(i, 1);
                                            inventory[0].stackSize++;
                                        }
                                        extracted = true;
View Full Code Here

Examples of net.minecraft.inventory.IInventory.decrStackSize()

                                for(int i = 0; i < inv.getSizeInventory(); i++) {
                                    if(inv.getStackInSlot(i) != null && inv.getStackInSlot(i).isItemEqual(searchedItemStack)) {
                                        if(inventory[0] == null) {
                                            inventory[0] = inv.decrStackSize(i, 1);
                                        } else {
                                            inv.decrStackSize(i, 1);
                                            inventory[0].stackSize++;
                                        }
                                        extracted = true;
                                        break;
                                    }
View Full Code Here

Examples of net.minecraft.inventory.Slot.decrStackSize()

                }
              }
            } else if (slot2.canTakeStack(player)) {
              if (itemstack4 == null) {
                l1 = p_75144_2_ == 0 ? itemstack3.stackSize : (itemstack3.stackSize + 1) / 2;
                itemstack5 = slot2.decrStackSize(l1);
                inventoryPlayer.setItemStack(itemstack5);

                if (itemstack3.stackSize == 0) {
                  slot2.putStack((ItemStack) null);
                }
View Full Code Here

Examples of net.minecraft.inventory.Slot.decrStackSize()

                  && ItemStack.areItemStackTagsEqual(itemstack3, itemstack4)) {
                l1 = itemstack3.stackSize;

                if (l1 > 0 && l1 + itemstack4.stackSize <= itemstack4.getMaxStackSize()) {
                  itemstack4.stackSize += l1;
                  itemstack3 = slot2.decrStackSize(l1);

                  if (itemstack3.stackSize == 0) {
                    slot2.putStack((ItemStack) null);
                  }
                  slot2.onPickupFromSlot(player, inventoryPlayer.getItemStack());
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.