public class Slot
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected IIcon |
backgroundIcon
Position within background texture file, normally -1 which causes no background to be drawn.
|
IInventory |
inventory |
int |
slotNumber |
protected ResourceLocation |
texture
Background texture file assigned to this slot, if any.
|
int |
xDisplayPosition |
int |
yDisplayPosition |
Constructor and Description |
---|
Slot(IInventory p_i1824_1_,
int p_i1824_2_,
int p_i1824_3_,
int p_i1824_4_) |
Modifier and Type | Method and Description |
---|---|
boolean |
canTakeStack(EntityPlayer p_82869_1_) |
ItemStack |
decrStackSize(int p_75209_1_) |
boolean |
func_111238_b() |
IIcon |
getBackgroundIconIndex() |
ResourceLocation |
getBackgroundIconTexture()
Gets the path of the texture file to use for the background image of this slot when drawing the GUI.
|
boolean |
getHasStack() |
int |
getSlotIndex()
Retrieves the index in the inventory for this slot, this value should typically not
be used, but can be useful for some occasions.
|
int |
getSlotStackLimit() |
ItemStack |
getStack() |
boolean |
isItemValid(ItemStack p_75214_1_) |
boolean |
isSlotInInventory(IInventory p_75217_1_,
int p_75217_2_) |
protected void |
onCrafting(ItemStack p_75208_1_) |
protected void |
onCrafting(ItemStack p_75210_1_,
int p_75210_2_) |
void |
onPickupFromSlot(EntityPlayer p_82870_1_,
ItemStack p_82870_2_) |
void |
onSlotChange(ItemStack p_75220_1_,
ItemStack p_75220_2_) |
void |
onSlotChanged() |
void |
putStack(ItemStack p_75215_1_) |
void |
setBackgroundIcon(IIcon icon)
Sets which icon index to use as the background image of the slot when it's empty.
|
void |
setBackgroundIconTexture(ResourceLocation texture)
Sets the texture file to use for the background image of the slot when it's empty.
|
public final IInventory inventory
public int slotNumber
public int xDisplayPosition
public int yDisplayPosition
protected IIcon backgroundIcon
protected ResourceLocation texture
public Slot(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_)
protected void onCrafting(ItemStack p_75210_1_, int p_75210_2_)
protected void onCrafting(ItemStack p_75208_1_)
public void onPickupFromSlot(EntityPlayer p_82870_1_, ItemStack p_82870_2_)
public boolean isItemValid(ItemStack p_75214_1_)
public ItemStack getStack()
public boolean getHasStack()
public void putStack(ItemStack p_75215_1_)
public void onSlotChanged()
public int getSlotStackLimit()
public ItemStack decrStackSize(int p_75209_1_)
public boolean isSlotInInventory(IInventory p_75217_1_, int p_75217_2_)
public boolean canTakeStack(EntityPlayer p_82869_1_)
public IIcon getBackgroundIconIndex()
public boolean func_111238_b()
public ResourceLocation getBackgroundIconTexture()
public void setBackgroundIcon(IIcon icon)
icon
- The icon to use, null for nonepublic void setBackgroundIconTexture(ResourceLocation texture)
textureFilename
- String: Path of texture file to use, or null to use "/gui/items.png"public int getSlotIndex()