net.minecraft.inventory

## Class Container

- java.lang.Object
- - net.minecraft.inventory.Container

- Direct Known Subclasses:
    ContainerBeacon, ContainerBrewingStand, ContainerChest, ContainerDispenser, ContainerEnchantment, ContainerFurnace, ContainerHopper, ContainerMerchant, ContainerPlayer, ContainerRepair, ContainerWorkbench

      public abstract class Container
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `List` | `inventoryItemStacks` the list of all items(stacks) for the corresponding slot
    `List` | `inventorySlots` the list of all slots in the inventory
    `int` | `windowId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Container()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCraftingToCrafters(ICrafting par1ICrafting)`
    `abstract boolean` | `canInteractWith(EntityPlayer entityplayer)`
    `void` | `detectAndSendChanges()` Looks for changes made in the container, sends them to every listener.
    `boolean` | `enchantItem(EntityPlayer par1EntityPlayer, int par2)` enchants the item on the table using the specified slot; also deducts XP from player
    `static void` | `func_94525_a(Set par0Set, int par1, ItemStack par2ItemStack, int par3)`
    `static int` | `func_94526_b(IInventory par0IInventory)`
    `static boolean` | `func_94527_a(Slot par0Slot, ItemStack par1ItemStack, boolean par2)`
    `static boolean` | `func_94528_d(int par0)`
    `static int` | `func_94529_b(int par0)`
    `boolean` | `func_94530_a(ItemStack par1ItemStack, Slot par2Slot)`
    `boolean` | `func_94531_b(Slot par1Slot)`
    `static int` | `func_94532_c(int par0)`
    `static int` | `func_94534_d(int par0, int par1)`
    `List` | `getInventory()` returns a list if itemStacks, for each slot.
    `short` | `getNextTransactionID(InventoryPlayer par1InventoryPlayer)`
    `Slot` | `getSlot(int par1)`
    `Slot` | `getSlotFromInventory(IInventory par1IInventory, int par2)`
    `boolean` | `isPlayerNotUsingContainer(EntityPlayer par1EntityPlayer)` NotUsing because adding a player twice is an error
    `void` | `onCraftGuiClosed(EntityPlayer par1EntityPlayer)` Callback for when the crafting gui is closed.
    `void` | `onCraftMatrixChanged(IInventory par1IInventory)` Callback for when the crafting matrix is changed.
    `void` | `putStackInSlot(int par1, ItemStack par2ItemStack)` args: slotID, itemStack to put in slot
    `void` | `putStacksInSlots(ItemStack[] par1ArrayOfItemStack)`
    `void` | `removeCraftingFromCrafters(ICrafting par1ICrafting)`
    `void` | `setPlayerIsPresent(EntityPlayer par1EntityPlayer, boolean par2)` adds or removes the player from the container based on par2
    `ItemStack` | `slotClick(int par1, int par2, int par3, EntityPlayer par4EntityPlayer)`
    `ItemStack` | `transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)` Called when a player shift-clicks on a slot.
    `void` | `updateProgressBar(int par1, int par2)`

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

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

- - ### Field Detail

    - #### inventoryItemStacks

          public List inventoryItemStacks

      the list of all items(stacks) for the corresponding slot

    - #### inventorySlots

          public List inventorySlots

      the list of all slots in the inventory

    - #### windowId

          public int windowId

  - ### Constructor Detail

    - #### Container

          public Container()

  - ### Method Detail

    - #### addCraftingToCrafters

          public void addCraftingToCrafters(ICrafting par1ICrafting)

    - #### getInventory

          public List getInventory()

      returns a list if itemStacks, for each slot.

    - #### removeCraftingFromCrafters

          public void removeCraftingFromCrafters(ICrafting par1ICrafting)

    - #### detectAndSendChanges

          public void detectAndSendChanges()

      Looks for changes made in the container, sends them to every listener.

    - #### enchantItem

          public boolean enchantItem(EntityPlayer par1EntityPlayer,
                            int par2)

      enchants the item on the table using the specified slot; also deducts XP from player

    - #### getSlotFromInventory

          public Slot getSlotFromInventory(IInventory par1IInventory,
                                  int par2)

    - #### getSlot

          public Slot getSlot(int par1)

    - #### transferStackInSlot

          public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer,
                                      int par2)

      Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.

    - #### slotClick

          public ItemStack slotClick(int par1,
                            int par2,
                            int par3,
                            EntityPlayer par4EntityPlayer)

    - #### func_94530_a

          public boolean func_94530_a(ItemStack par1ItemStack,
                             Slot par2Slot)

    - #### onCraftGuiClosed

          public void onCraftGuiClosed(EntityPlayer par1EntityPlayer)

      Callback for when the crafting gui is closed.

    - #### onCraftMatrixChanged

          public void onCraftMatrixChanged(IInventory par1IInventory)

      Callback for when the crafting matrix is changed.

    - #### putStackInSlot

          public void putStackInSlot(int par1,
                            ItemStack par2ItemStack)

      args: slotID, itemStack to put in slot

    - #### putStacksInSlots

          public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack)

    - #### updateProgressBar

          public void updateProgressBar(int par1,
                               int par2)

    - #### getNextTransactionID

          public short getNextTransactionID(InventoryPlayer par1InventoryPlayer)

    - #### isPlayerNotUsingContainer

          public boolean isPlayerNotUsingContainer(EntityPlayer par1EntityPlayer)

      NotUsing because adding a player twice is an error

    - #### setPlayerIsPresent

          public void setPlayerIsPresent(EntityPlayer par1EntityPlayer,
                                boolean par2)

      adds or removes the player from the container based on par2

    - #### canInteractWith

          public abstract boolean canInteractWith(EntityPlayer entityplayer)

    - #### func_94529_b

          public static int func_94529_b(int par0)

    - #### func_94532_c

          public static int func_94532_c(int par0)

    - #### func_94534_d

          public static int func_94534_d(int par0,
                         int par1)

    - #### func_94528_d

          public static boolean func_94528_d(int par0)

    - #### func_94527_a

          public static boolean func_94527_a(Slot par0Slot,
                             ItemStack par1ItemStack,
                             boolean par2)

    - #### func_94525_a

          public static void func_94525_a(Set par0Set,
                          int par1,
                          ItemStack par2ItemStack,
                          int par3)

    - #### func_94531_b

          public boolean func_94531_b(Slot par1Slot)

    - #### func_94526_b

          public static int func_94526_b(IInventory par0IInventory)