Class CreativeScreen.CreativeSlot
java.lang.Object
net.minecraft.inventory.container.Slot
net.minecraft.client.gui.screen.inventory.CreativeScreen.CreativeSlot
- Enclosing class:
- CreativeScreen
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreativeSlot(Slot p_i229959_1_, int p_i229959_2_, int p_i229959_3_, int p_i229959_4_) -
Method Summary
Modifier and TypeMethodDescriptiongetItem()intintgetMaxStackSize(ItemStack p_178170_1_) com.mojang.datafixers.util.Pair<ResourceLocation,ResourceLocation> intRetrieves the index in the inventory for this slot, this value should typically not be used, but can be useful for some occasions.booleanhasItem()booleanisActive()booleanisSameInventory(Slot other) Checks if the other slot is in the same inventory, by comparing the inventory reference.booleanmayPickup(PlayerEntity p_82869_1_) booleanonTake(PlayerEntity p_190901_1_, ItemStack p_190901_2_) remove(int p_75209_1_) voidsetBackground(ResourceLocation atlas, ResourceLocation sprite) Sets the background atlas and sprite location.voidMethods inherited from class net.minecraft.inventory.container.Slot
checkTakeAchievements, onQuickCraft, onQuickCraft, onSwapCraft
-
Field Details
-
target
-
-
Constructor Details
-
CreativeSlot
-
-
Method Details
-
onTake
-
mayPlace
-
getItem
-
hasItem
public boolean hasItem() -
set
-
setChanged
public void setChanged()- Overrides:
setChangedin classSlot
-
getMaxStackSize
public int getMaxStackSize()- Overrides:
getMaxStackSizein classSlot
-
getMaxStackSize
- Overrides:
getMaxStackSizein classSlot
-
getNoItemIcon
- Overrides:
getNoItemIconin classSlot
-
remove
-
isActive
public boolean isActive() -
mayPickup
-
getSlotIndex
public int getSlotIndex()Description copied from class:SlotRetrieves the index in the inventory for this slot, this value should typically not be used, but can be useful for some occasions.- Overrides:
getSlotIndexin classSlot- Returns:
- Index in associated inventory for this slot.
-
isSameInventory
Description copied from class:SlotChecks if the other slot is in the same inventory, by comparing the inventory reference.- Overrides:
isSameInventoryin classSlot- Returns:
- true if the other slot is in the same inventory
-
setBackground
Description copied from class:SlotSets the background atlas and sprite location.- Overrides:
setBackgroundin classSlot- Parameters:
atlas- The atlas namesprite- The sprite located on that atlas.- Returns:
- this, to allow chaining.
-