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