Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class Container

    java.lang.Object
      net.minecraft.src.Container

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

    public abstract class Container

extends Object

Field Summary
`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
`Container()`

Method Summary
`void` | `addCraftingToCrafters(ICrafting par1ICrafting)`
`abstract boolean` | `canInteractWith(EntityPlayer var1)`
`boolean` | `enchantItem(EntityPlayer par1EntityPlayer, int par2)` enchants the item on the table using the specified slot; also deducts XP from player
`ItemStack` | `func_82846_b(EntityPlayer par1EntityPlayer, int par2)`
`void` | `func_82847_b(ICrafting par1ICrafting)`
`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` | `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)`
`void` | `updateCraftingResults()` Updates crafting matrix; called from onCraftMatrixChanged.
`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.

### func_82847_b

    public void func_82847_b(ICrafting par1ICrafting)

### updateCraftingResults

    public void updateCraftingResults()

  Updates crafting matrix; called from onCraftMatrixChanged. Args: none

### 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)

### func_82846_b

    public ItemStack func_82846_b(EntityPlayer par1EntityPlayer,
                                  int par2)

### slotClick

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

### 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

### isPlayerNotUsingContainer

    public boolean isPlayerNotUsingContainer(EntityPlayer par1EntityPlayer)

  NotUsing because adding a player twice is an error

### putStacksInSlots

    public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack)

### setPlayerIsPresent

    public void setPlayerIsPresent(EntityPlayer par1EntityPlayer,
                                   boolean par2)

  adds or removes the player from the container based on par2

### updateProgressBar

    public void updateProgressBar(int par1,
                                  int par2)

### getNextTransactionID

    public short getNextTransactionID(InventoryPlayer par1InventoryPlayer)

### canInteractWith

    public abstract boolean canInteractWith(EntityPlayer var1)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD