Package net.minecraft.world.ticks
Interface ContainerSingleItem
- All Known Subinterfaces:
ContainerSingleItem.BlockContainerSingleItem
- All Known Implementing Classes:
DecoratedPotBlockEntity
,JukeboxBlockEntity
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
-
Field Summary
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
default int
default ItemStack
getItem
(int pSlot) Returns the stack in the given slot.default boolean
isEmpty()
default ItemStack
removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.default ItemStack
removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.default ItemStack
default void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
setTheItem
(ItemStack pItem) default ItemStack
splitTheItem
(int pAmount) Methods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stillValid, stopOpen
-
Method Details
-
getTheItem
ItemStack getTheItem() -
splitTheItem
-
setTheItem
-
removeTheItem
-
getContainerSize
default int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
isEmpty
default boolean isEmpty() -
clearContent
default void clearContent()- Specified by:
clearContent
in interfaceClearable
-
removeItemNoUpdate
Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdate
in interfaceContainer
-
getItem
Returns the stack in the given slot. -
removeItem
Removes up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItem
in interfaceContainer
-
setItem
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
-