    001package net.minecraft.inventory;
    002
    003import net.minecraft.entity.player.EntityPlayer;
    004import net.minecraft.item.ItemStack;
    005
    006public interface IInventory
    007{
    008    /**
    009     * Returns the number of slots in the inventory.
    010     */
    011    int getSizeInventory();
    012
    013    /**
    014     * Returns the stack in slot i
    015     */
    016    ItemStack getStackInSlot(int var1);
    017
    018    /**
    019     * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
    020     * new stack.
    021     */
    022    ItemStack decrStackSize(int var1, int var2);
    023
    024    /**
    025     * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
    026     * like when you close a workbench GUI.
    027     */
    028    ItemStack getStackInSlotOnClosing(int var1);
    029
    030    /**
    031     * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
    032     */
    033    void setInventorySlotContents(int var1, ItemStack var2);
    034
    035    /**
    036     * Returns the name of the inventory.
    037     */
    038    String getInvName();
    039
    040    /**
    041     * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
    042     * this more of a set than a get?*
    043     */
    044    int getInventoryStackLimit();
    045
    046    /**
    047     * Called when an the contents of an Inventory change, usually
    048     */
    049    void onInventoryChanged();
    050
    051    /**
    052     * Do not make give this method the name canInteractWith because it clashes with Container
    053     */
    054    boolean isUseableByPlayer(EntityPlayer var1);
    055
    056    void openChest();
    057
    058    void closeChest();
    059}