class GuiContainerCreative.CreativeSlot extends Slot
Modifier and Type | Field and Description |
---|---|
private Slot |
slot |
inventory, slotNumber, xDisplayPosition, yDisplayPosition
Constructor and Description |
---|
CreativeSlot(Slot p_i46313_2_,
int p_i46313_3_) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
decrStackSize(int amount)
Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.
|
boolean |
getHasStack()
Returns if this slot contains a stack.
|
int |
getItemStackLimit(ItemStack 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)
|
java.lang.String |
getSlotTexture() |
ItemStack |
getStack()
Helper fnct to get the stack in the slot.
|
boolean |
isHere(IInventory inv,
int slotIn)
returns true if the slot exists in the given inventory and location
|
boolean |
isItemValid(ItemStack stack)
Check if the stack is a valid item for this slot.
|
void |
onPickupFromSlot(EntityPlayer playerIn,
ItemStack stack) |
void |
onSlotChanged()
Called when the stack in a Slot changes
|
void |
putStack(ItemStack stack)
Helper method to put a stack in the slot.
|
canBeHovered, canTakeStack, onCrafting, onCrafting, onSlotChange
private final Slot slot
public CreativeSlot(Slot p_i46313_2_, int p_i46313_3_)
public void onPickupFromSlot(EntityPlayer playerIn, ItemStack stack)
onPickupFromSlot
in class Slot
public boolean isItemValid(ItemStack stack)
Slot
isItemValid
in class Slot
public ItemStack getStack()
Slot
public boolean getHasStack()
Slot
getHasStack
in class Slot
public void putStack(ItemStack stack)
Slot
public void onSlotChanged()
Slot
onSlotChanged
in class Slot
public int getSlotStackLimit()
Slot
getSlotStackLimit
in class Slot
public int getItemStackLimit(ItemStack stack)
getItemStackLimit
in class Slot
public java.lang.String getSlotTexture()
getSlotTexture
in class Slot
public ItemStack decrStackSize(int amount)
Slot
decrStackSize
in class Slot
public boolean isHere(IInventory inv, int slotIn)
Slot