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 voiddefault intdefault ItemStackgetItem(int pSlot) Returns the stack in the given slot.default booleanisEmpty()default ItemStackremoveItem(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.default ItemStackremoveItemNoUpdate(int pSlot) Removes a stack from the given slot and returns it.default ItemStackdefault voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidsetTheItem(ItemStack pItem) default ItemStacksplitTheItem(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:
getContainerSizein interfaceContainer
-
isEmpty
default boolean isEmpty() -
clearContent
default void clearContent()- Specified by:
clearContentin interfaceClearable
-
removeItemNoUpdate
Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdatein 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:
removeItemin interfaceContainer
-
setItem
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
-