class GuiContainerCreative.CreativeSlot extends Slot
| Modifier and Type | Field and Description |
|---|---|
private Slot |
slot |
backgroundLocation, backgroundMap, backgroundName, inventory, slotNumber, xPos, yPos| Constructor and Description |
|---|
CreativeSlot(Slot p_i46313_2_,
int index) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canTakeStack(EntityPlayer playerIn) |
ItemStack |
decrStackSize(int amount) |
ResourceLocation |
getBackgroundLocation()
Gets the path of the texture file to use for the background image of this slot when drawing the GUI.
|
TextureAtlasSprite |
getBackgroundSprite() |
boolean |
getHasStack() |
int |
getItemStackLimit(ItemStack stack) |
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() |
java.lang.String |
getSlotTexture() |
ItemStack |
getStack() |
boolean |
isEnabled() |
boolean |
isHere(IInventory inv,
int slotIn) |
boolean |
isItemValid(ItemStack stack) |
boolean |
isSameInventory(Slot other)
Checks if the other slot is in the same inventory, by comparing the inventory reference.
|
void |
onSlotChanged() |
ItemStack |
onTake(EntityPlayer thePlayer,
ItemStack stack) |
void |
putStack(ItemStack stack) |
void |
setBackgroundLocation(ResourceLocation texture)
Sets the texture file to use for the background image of the slot when it's empty.
|
void |
setBackgroundName(java.lang.String name)
Sets which icon index to use as the background image of the slot when it's empty.
|
getBackgroundMap, onCrafting, onCrafting, onSlotChange, onSwapCraftprivate final Slot slot
public CreativeSlot(Slot p_i46313_2_, int index)
public ItemStack onTake(EntityPlayer thePlayer, ItemStack stack)
public boolean isItemValid(ItemStack stack)
isItemValid in class Slotpublic boolean getHasStack()
getHasStack in class Slotpublic void onSlotChanged()
onSlotChanged in class Slotpublic int getSlotStackLimit()
getSlotStackLimit in class Slotpublic int getItemStackLimit(ItemStack stack)
getItemStackLimit in class Slot@Nullable public java.lang.String getSlotTexture()
getSlotTexture in class Slotpublic ItemStack decrStackSize(int amount)
decrStackSize in class Slotpublic boolean isHere(IInventory inv, int slotIn)
public boolean canTakeStack(EntityPlayer playerIn)
canTakeStack in class Slotpublic ResourceLocation getBackgroundLocation()
SlotgetBackgroundLocation in class Slotpublic void setBackgroundLocation(ResourceLocation texture)
SlotsetBackgroundLocation in class Slottexture - the resourcelocation for the texturepublic void setBackgroundName(@Nullable
java.lang.String name)
SlotsetBackgroundName in class Slotname - The icon to use, null for none@Nullable public TextureAtlasSprite getBackgroundSprite()
getBackgroundSprite in class Slotpublic int getSlotIndex()
SlotgetSlotIndex in class Slotpublic boolean isSameInventory(Slot other)
SlotisSameInventory in class Slot