net.minecraft.entity.player

## Class InventoryPlayer

- java.lang.Object
- - net.minecraft.entity.player.InventoryPlayer

- All Implemented Interfaces:
    IInventory

      public class InventoryPlayer
      extends java.lang.Object
      implements IInventory

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ItemStack[]` | `armorInventory`
    `int` | `currentItem`
    `boolean` | `inventoryChanged`
    `ItemStack[]` | `mainInventory`
    `EntityPlayer` | `player`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InventoryPlayer(EntityPlayer par1EntityPlayer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addItemStackToInventory(ItemStack par1ItemStack)`
    `ItemStack` | `armorItemInSlot(int par1)`
    `void` | `changeCurrentItem(int par1)`
    `int` | `clearInventory(Item p_146027_1_, int p_146027_2_)`
    `void` | `closeInventory()`
    `boolean` | `consumeInventoryItem(Item p_146026_1_)`
    `void` | `copyInventory(InventoryPlayer par1InventoryPlayer)`
    `void` | `damageArmor(float par1)`
    `void` | `decrementAnimations()`
    `ItemStack` | `decrStackSize(int par1, int par2)`
    `void` | `dropAllItems()`
    `float` | `func_146023_a(Block p_146023_1_)`
    `boolean` | `func_146025_b(Block p_146025_1_)`
    `void` | `func_146030_a(Item p_146030_1_, int p_146030_2_, boolean p_146030_3_, boolean p_146030_4_)`
    `void` | `func_70439_a(Item par1Item, int par2)`
    `ItemStack` | `getCurrentItem()`
    `int` | `getFirstEmptyStack()`
    `static int` | `getHotbarSize()`
    `java.lang.String` | `getInventoryName()`
    `int` | `getInventoryStackLimit()`
    `ItemStack` | `getItemStack()`
    `int` | `getSizeInventory()`
    `ItemStack` | `getStackInSlot(int par1)`
    `ItemStack` | `getStackInSlotOnClosing(int par1)`
    `int` | `getTotalArmorValue()`
    `boolean` | `hasCustomInventoryName()`
    `boolean` | `hasItem(Item p_146028_1_)`
    `boolean` | `hasItemStack(ItemStack par1ItemStack)`
    `boolean` | `isItemValidForSlot(int par1, ItemStack par2ItemStack)`
    `boolean` | `isUseableByPlayer(EntityPlayer par1EntityPlayer)`
    `void` | `markDirty()`
    `void` | `openInventory()`
    `void` | `readFromNBT(NBTTagList par1NBTTagList)`
    `void` | `setInventorySlotContents(int par1, ItemStack par2ItemStack)`
    `void` | `setItemStack(ItemStack par1ItemStack)`
    `NBTTagList` | `writeToNBT(NBTTagList par1NBTTagList)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mainInventory

          public ItemStack[] mainInventory

    - #### armorInventory

          public ItemStack[] armorInventory

    - #### currentItem

          public int currentItem

    - #### player

          public EntityPlayer player

    - #### inventoryChanged

          public boolean inventoryChanged

  - ### Constructor Detail

    - #### InventoryPlayer

          public InventoryPlayer(EntityPlayer par1EntityPlayer)

  - ### Method Detail

    - #### getCurrentItem

          public ItemStack getCurrentItem()

    - #### getHotbarSize

          public static int getHotbarSize()

    - #### getFirstEmptyStack

          public int getFirstEmptyStack()

    - #### func_146030_a

          public void func_146030_a(Item p_146030_1_,
                           int p_146030_2_,
                           boolean p_146030_3_,
                           boolean p_146030_4_)

    - #### clearInventory

          public int clearInventory(Item p_146027_1_,
                           int p_146027_2_)

    - #### changeCurrentItem

          public void changeCurrentItem(int par1)

    - #### func_70439_a

          public void func_70439_a(Item par1Item,
                          int par2)

    - #### decrementAnimations

          public void decrementAnimations()

    - #### consumeInventoryItem

          public boolean consumeInventoryItem(Item p_146026_1_)

    - #### hasItem

          public boolean hasItem(Item p_146028_1_)

    - #### addItemStackToInventory

          public boolean addItemStackToInventory(ItemStack par1ItemStack)

    - #### decrStackSize

          public ItemStack decrStackSize(int par1,
                                int par2)

      Specified by:
        `decrStackSize` in interface `IInventory`

    - #### getStackInSlotOnClosing

          public ItemStack getStackInSlotOnClosing(int par1)

      Specified by:
        `getStackInSlotOnClosing` in interface `IInventory`

    - #### setInventorySlotContents

          public void setInventorySlotContents(int par1,
                                      ItemStack par2ItemStack)

      Specified by:
        `setInventorySlotContents` in interface `IInventory`

    - #### func_146023_a

          public float func_146023_a(Block p_146023_1_)

    - #### writeToNBT

          public NBTTagList writeToNBT(NBTTagList par1NBTTagList)

    - #### readFromNBT

          public void readFromNBT(NBTTagList par1NBTTagList)

    - #### getSizeInventory

          public int getSizeInventory()

      Specified by:
        `getSizeInventory` in interface `IInventory`

    - #### getStackInSlot

          public ItemStack getStackInSlot(int par1)

      Specified by:
        `getStackInSlot` in interface `IInventory`

    - #### getInventoryName

          public java.lang.String getInventoryName()

      Specified by:
        `getInventoryName` in interface `IInventory`

    - #### hasCustomInventoryName

          public boolean hasCustomInventoryName()

      Specified by:
        `hasCustomInventoryName` in interface `IInventory`

    - #### getInventoryStackLimit

          public int getInventoryStackLimit()

      Specified by:
        `getInventoryStackLimit` in interface `IInventory`

    - #### func_146025_b

          public boolean func_146025_b(Block p_146025_1_)

    - #### armorItemInSlot

          public ItemStack armorItemInSlot(int par1)

    - #### getTotalArmorValue

          public int getTotalArmorValue()

    - #### damageArmor

          public void damageArmor(float par1)

    - #### dropAllItems

          public void dropAllItems()

    - #### markDirty

          public void markDirty()

      Specified by:
        `markDirty` in interface `IInventory`

    - #### setItemStack

          public void setItemStack(ItemStack par1ItemStack)

    - #### getItemStack

          public ItemStack getItemStack()

    - #### isUseableByPlayer

          public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)

      Specified by:
        `isUseableByPlayer` in interface `IInventory`

    - #### hasItemStack

          public boolean hasItemStack(ItemStack par1ItemStack)

    - #### openInventory

          public void openInventory()

      Specified by:
        `openInventory` in interface `IInventory`

    - #### closeInventory

          public void closeInventory()

      Specified by:
        `closeInventory` in interface `IInventory`

    - #### isItemValidForSlot

          public boolean isItemValidForSlot(int par1,
                                   ItemStack par2ItemStack)

      Specified by:
        `isItemValidForSlot` in interface `IInventory`

    - #### copyInventory

          public void copyInventory(InventoryPlayer par1InventoryPlayer)