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, onSwapCraft
private 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 Slot
public boolean getHasStack()
getHasStack
in class Slot
public void onSlotChanged()
onSlotChanged
in class Slot
public int getSlotStackLimit()
getSlotStackLimit
in class Slot
public int getItemStackLimit(ItemStack stack)
getItemStackLimit
in class Slot
@Nullable public java.lang.String getSlotTexture()
getSlotTexture
in class Slot
public ItemStack decrStackSize(int amount)
decrStackSize
in class Slot
public boolean isHere(IInventory inv, int slotIn)
public boolean canTakeStack(EntityPlayer playerIn)
canTakeStack
in class Slot
public ResourceLocation getBackgroundLocation()
Slot
getBackgroundLocation
in class Slot
public void setBackgroundLocation(ResourceLocation texture)
Slot
setBackgroundLocation
in class Slot
texture
- the resourcelocation for the texturepublic void setBackgroundName(@Nullable java.lang.String name)
Slot
setBackgroundName
in class Slot
name
- The icon to use, null for none@Nullable public TextureAtlasSprite getBackgroundSprite()
getBackgroundSprite
in class Slot
public int getSlotIndex()
Slot
getSlotIndex
in class Slot
public boolean isSameInventory(Slot other)
Slot
isSameInventory
in class Slot