Package net.minecraft.world.ticks
Interface ContainerSingleItem
- All Superinterfaces:
Clearable,Container,ContainerExtension,Iterable<ItemStack>
- All Known Subinterfaces:
ContainerSingleItem.BlockContainerSingleItem
- All Known Implementing Classes:
DecoratedPotBlockEntity,JukeboxBlockEntity
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceNested classes/interfaces inherited from interface net.minecraft.world.Container
Container.ContainerIterator -
Field Summary
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault intdefault ItemStackgetItem(int p_304882_) Returns the stack in the given slot.default booleanisEmpty()default ItemStackremoveItem(int p_304944_, int p_304791_) Removes up to a specified number of items from an inventory slot and returns them in a new stack.default ItemStackremoveItemNoUpdate(int p_273409_) 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, getEntitiesWithContainerOpen, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, iterator, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransfer, setItemMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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
Description copied from interface:ContainerRemoves a stack from the given slot and returns it.- Specified by:
removeItemNoUpdatein interfaceContainer
-
getItem
Description copied from interface:ContainerReturns the stack in the given slot. -
removeItem
Description copied from interface:ContainerRemoves up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItemin interfaceContainer
-
setItem
Description copied from interface:ContainerSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
-