Interface ContainerSingleItem
- All Superinterfaces:
Clearable, Container, ContainerExtension, Iterable<ItemStack>, SlotProvider
- All Known Subinterfaces:
ContainerSingleItem.BlockContainerSingleItem
- All Known Implementing Classes:
DecoratedPotBlockEntity, JukeboxBlockEntity
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceNested classes/interfaces inherited from interface Container
Container.ContainerIterator -
Field Summary
Fields inherited from interface Container
DEFAULT_DISTANCE_BUFFER -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault intdefault ItemStackgetItem(int slot) Returns the stack in the given slot.default booleanisEmpty()default ItemStackremoveItem(int slot, int count) Removes up to a specified number of items from an inventory slot and returns them in a new stack.default ItemStackremoveItemNoUpdate(int slot) 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 itemStack) default ItemStacksplitTheItem(int count) Methods inherited from interface Container
canPlaceItem, canTakeItem, countItem, getEntitiesWithContainerOpen, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iterator, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface ContainerExtension
onTransfer, setItemMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface SlotProvider
getSlotsFromRange
-
Method Details
-
getTheItem
ItemStack getTheItem() -
splitTheItem
-
setTheItem
-
removeTheItem
-
getContainerSize
default int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
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
-
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
-