Package net.minecraft.world
Class SimpleContainer
java.lang.Object
net.minecraft.world.SimpleContainer
- All Implemented Interfaces:
- Clearable,- Container,- StackedContentsCompatible
- Direct Known Subclasses:
- ComposterBlock.EmptyContainer,- ComposterBlock.InputContainer,- ComposterBlock.OutputContainer,- PlayerEnderChestContainer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final NonNullList<ItemStack> private List<ContainerListener> private final intFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_BUFFER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(ContainerListener p_19165_) booleancanAddItem(ItemStack p_19184_) voidcreateTag(HolderLookup.Provider p_333125_) voidfillStackedContents(StackedContents p_19169_) voidfromTag(ListTag p_19178_, HolderLookup.Provider p_328200_) intgetItem(int p_19157_) getItems()booleanisEmpty()private voidmoveItemsBetweenStacks(ItemStack p_19186_, ItemStack p_19187_) private voidmoveItemToEmptySlots(ItemStack p_19190_) private voidmoveItemToOccupiedSlotsWithSameType(ItemStack p_19192_) removeItem(int p_19159_, int p_19160_) removeItemNoUpdate(int p_19180_) removeItemType(Item p_19171_, int p_19172_) voidremoveListener(ContainerListener p_19182_) voidvoidbooleanstillValid(Player p_19167_) toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercanPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
- 
Field Details- 
sizeprivate final int size
- 
items
- 
listeners
 
- 
- 
Constructor Details- 
SimpleContainerpublic SimpleContainer(int p_19150_) 
- 
SimpleContainer
 
- 
- 
Method Details- 
addListener
- 
removeListener
- 
getItem
- 
removeAllItems
- 
removeItem- Specified by:
- removeItemin interface- Container
 
- 
removeItemType
- 
addItem
- 
canAddItem
- 
removeItemNoUpdate- Specified by:
- removeItemNoUpdatein interface- Container
 
- 
setItem
- 
getContainerSizepublic int getContainerSize()- Specified by:
- getContainerSizein interface- Container
 
- 
isEmptypublic boolean isEmpty()
- 
setChangedpublic void setChanged()- Specified by:
- setChangedin interface- Container
 
- 
stillValid- Specified by:
- stillValidin interface- Container
 
- 
clearContentpublic void clearContent()- Specified by:
- clearContentin interface- Clearable
 
- 
fillStackedContents- Specified by:
- fillStackedContentsin interface- StackedContentsCompatible
 
- 
toString
- 
moveItemToEmptySlots
- 
moveItemToOccupiedSlotsWithSameType
- 
moveItemsBetweenStacks
- 
fromTag
- 
createTag
- 
getItems
 
-