|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.src.Slot
public class Slot
Field Summary | |
---|---|
IInventory |
inventory
The inventory we want to extract a slot from. |
int |
slotNumber
the id of the slot(also the index in the inventory arraylist) |
int |
xDisplayPosition
display position of the inventory slot on the screen x axis |
int |
yDisplayPosition
display position of the inventory slot on the screen y axis |
Constructor Summary | |
---|---|
Slot(IInventory par1IInventory,
int par2,
int par3,
int par4)
|
Method Summary | |
---|---|
ItemStack |
decrStackSize(int par1)
Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. |
boolean |
func_82869_a(EntityPlayer par1EntityPlayer)
|
void |
func_82870_a(EntityPlayer par1EntityPlayer,
ItemStack par2ItemStack)
|
int |
getBackgroundIconIndex()
|
boolean |
getHasStack()
Returns if this slot contains a stack. |
int |
getSlotStackLimit()
Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case of armor slots) |
ItemStack |
getStack()
Helper fnct to get the stack in the slot. |
boolean |
isItemValid(ItemStack par1ItemStack)
Check if the stack is a valid item for this slot. |
boolean |
isSlotInInventory(IInventory par1IInventory,
int par2)
returns true if this slot is in par2 of par1 |
void |
onSlotChange(ItemStack par1ItemStack,
ItemStack par2ItemStack)
if par2 has more items than par1, onCrafting(item,countIncrease) is called |
void |
onSlotChanged()
Called when the stack in a Slot changes |
void |
putStack(ItemStack par1ItemStack)
Helper method to put a stack in the slot. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final IInventory inventory
public int slotNumber
public int xDisplayPosition
public int yDisplayPosition
Constructor Detail |
---|
public Slot(IInventory par1IInventory, int par2, int par3, int par4)
Method Detail |
---|
public void onSlotChange(ItemStack par1ItemStack, ItemStack par2ItemStack)
public void func_82870_a(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack)
public boolean isItemValid(ItemStack par1ItemStack)
public ItemStack getStack()
public boolean getHasStack()
public void putStack(ItemStack par1ItemStack)
public void onSlotChanged()
public int getSlotStackLimit()
public ItemStack decrStackSize(int par1)
public boolean isSlotInInventory(IInventory par1IInventory, int par2)
public boolean func_82869_a(EntityPlayer par1EntityPlayer)
public int getBackgroundIconIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |