static class CreativeScreen.CreativeSlot extends Slot
| Modifier and Type | Field and Description |
|---|---|
private Slot |
slot |
inventory, slotNumber, xPos, yPos| Constructor and Description |
|---|
CreativeSlot(Slot p_i229959_1_,
int p_i229959_2_,
int p_i229959_3_,
int p_i229959_4_) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canTakeStack(PlayerEntity playerIn) |
ItemStack |
decrStackSize(int amount) |
com.mojang.datafixers.util.Pair<ResourceLocation,ResourceLocation> |
func_225517_c_() |
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() |
ItemStack |
getStack() |
boolean |
isEnabled() |
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(PlayerEntity thePlayer,
ItemStack stack) |
void |
putStack(ItemStack stack) |
Slot |
setBackground(ResourceLocation atlas,
ResourceLocation sprite)
Sets the background atlas and sprite location.
|
onCrafting, onCrafting, onSlotChange, onSwapCraftprivate final Slot slot
public CreativeSlot(Slot p_i229959_1_, int p_i229959_2_, int p_i229959_3_, int p_i229959_4_)
public ItemStack onTake(PlayerEntity 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 com.mojang.datafixers.util.Pair<ResourceLocation,ResourceLocation> func_225517_c_()
func_225517_c_ in class Slotpublic ItemStack decrStackSize(int amount)
decrStackSize in class Slotpublic boolean canTakeStack(PlayerEntity playerIn)
canTakeStack in class Slotpublic int getSlotIndex()
SlotgetSlotIndex in class Slotpublic boolean isSameInventory(Slot other)
SlotisSameInventory in class Slotpublic Slot setBackground(ResourceLocation atlas, ResourceLocation sprite)
SlotsetBackground in class Slotatlas - The atlas namesprite - The sprite located on that atlas.