Class CreativeModeInventoryScreen.SlotWrapper
java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.SlotWrapper
- Enclosing class:
CreativeModeInventoryScreen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem()intintgetMaxStackSize(ItemStack itemStack) @Nullable IdentifierintRetrieves 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.booleanbooleanvoidremove(int amount) voidsetBackground(Identifier sprite) Sets the background atlas and sprite location.voidsetByPlayer(ItemStack itemStack, ItemStack previous) voidMethods inherited from class Slot
allowModification, checkTakeAchievements, getContainerSlot, isFake, isHighlightable, onQuickCraft, onQuickCraft, onSwapCraft, safeInsert, safeInsert, safeTake, setByPlayer, tryRemove
-
Field Details
-
target
-
-
Constructor Details
-
SlotWrapper
-
-
Method Details
-
onTake
-
mayPlace
-
getItem
-
hasItem
-
setByPlayer
- Overrides:
setByPlayerin classSlot
-
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
-
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- Parameters:
other-- 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:
sprite- The sprite located on that atlas.- Returns:
- this, to allow chaining.
-