public abstract class Container
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
crafters
list of all people that need to be notified when this craftinventory changes
|
java.util.List |
inventoryItemStacks
the list of all items(stacks) for the corresponding slot
|
java.util.List |
inventorySlots
the list of all slots in the inventory
|
int |
windowId |
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
void |
addCraftingToCrafters(ICrafting par1ICrafting) |
protected Slot |
addSlotToContainer(Slot par1Slot)
the slot is assumed empty
|
static int |
calcRedstoneFromInventory(IInventory par0IInventory) |
boolean |
canDragIntoSlot(Slot par1Slot)
Returns true if the player can "drag-spilt" items into this slot,.
|
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(java.util.Set par0Set,
int par1,
ItemStack par2ItemStack,
int par3) |
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) |
static int |
func_94532_c(int par0) |
protected void |
func_94533_d() |
static int |
func_94534_d(int par0,
int par1) |
java.util.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
|
protected boolean |
mergeItemStack(ItemStack par1ItemStack,
int par2,
int par3,
boolean par4)
merges provided ItemStack with the first avaliable one in the container/player inventory
|
void |
onContainerClosed(EntityPlayer par1EntityPlayer)
Called when the container 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) |
protected void |
retrySlotClick(int par1,
int par2,
boolean par3,
EntityPlayer par4EntityPlayer) |
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) |
public java.util.List inventoryItemStacks
public java.util.List inventorySlots
public int windowId
protected java.util.List crafters
public void addCraftingToCrafters(ICrafting par1ICrafting)
public java.util.List getInventory()
public void removeCraftingFromCrafters(ICrafting par1ICrafting)
public void detectAndSendChanges()
public boolean enchantItem(EntityPlayer par1EntityPlayer, int par2)
public Slot getSlotFromInventory(IInventory par1IInventory, int par2)
public Slot getSlot(int par1)
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer par4EntityPlayer)
protected void retrySlotClick(int par1, int par2, boolean par3, EntityPlayer par4EntityPlayer)
public void onContainerClosed(EntityPlayer par1EntityPlayer)
public void onCraftMatrixChanged(IInventory par1IInventory)
public void putStackInSlot(int par1, ItemStack par2ItemStack)
public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack)
public void updateProgressBar(int par1, int par2)
public short getNextTransactionID(InventoryPlayer par1InventoryPlayer)
public boolean isPlayerNotUsingContainer(EntityPlayer par1EntityPlayer)
public void setPlayerIsPresent(EntityPlayer par1EntityPlayer, boolean par2)
public abstract boolean canInteractWith(EntityPlayer entityplayer)
protected boolean mergeItemStack(ItemStack par1ItemStack, int par2, int par3, boolean par4)
public static int func_94529_b(int par0)
public static int func_94532_c(int par0)
public static int func_94534_d(int par0, int par1)
public static boolean func_94528_d(int par0)
protected void func_94533_d()
public static boolean func_94527_a(Slot par0Slot, ItemStack par1ItemStack, boolean par2)
public static void func_94525_a(java.util.Set par0Set, int par1, ItemStack par2ItemStack, int par3)
public boolean canDragIntoSlot(Slot par1Slot)
public static int calcRedstoneFromInventory(IInventory par0IInventory)