Package net.minecraft.inventory

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


                        {
                          return 1;
                        }

                        ItemStack copyStack = checkStack.copy();
                        inventory.decrStackSize(i, 1);
                        ((ItemBlock) copyStack.getItem()).placeBlockAt(copyStack, null, ((TileEntity) projector).worldObj, position.intX(), position.intY(), position.intZ(), 0, 0, 0, 0, metadata);
                        PacketHandler.sendPacketToClients(ModularForceFieldSystem.PACKET_TILE.getPacket((TileEntity) projector, TilePacketType.FXS.ordinal(), 1, position.intX(), position.intY(), position.intZ()), ((TileEntity) projector).worldObj);

                        if (this.blockCount++ >= projector.getModuleCount(ModularForceFieldSystem.itemModuleSpeed) / 3)
                        {
View Full Code Here


  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

  @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

        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

  @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

        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

    @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

                                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

                                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

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.