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,RecipeBookExtensionTest.RecipeBookTestContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NonNullList<ItemStack>private List<ContainerListener>private final intFields inherited from interface net.minecraft.world.Container
LARGE_MAX_STACK_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ContainerListener p_19165_) booleancanAddItem(ItemStack p_19184_) voidvoidfillStackedContents(StackedContents p_19169_) voidintgetItem(int p_19157_) 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canPlaceItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
-
Field Details
-
size
private final int size -
items
-
listeners
-
-
Constructor Details
-
SimpleContainer
public SimpleContainer(int p_19150_) -
SimpleContainer
-
-
Method Details
-
addListener
-
removeListener
-
getItem
-
removeAllItems
-
removeItem
- Specified by:
removeItemin interfaceContainer
-
removeItemType
-
addItem
-
canAddItem
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
isEmpty
public boolean isEmpty() -
setChanged
public void setChanged()- Specified by:
setChangedin interfaceContainer
-
stillValid
- Specified by:
stillValidin interfaceContainer
-
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
fillStackedContents
- Specified by:
fillStackedContentsin interfaceStackedContentsCompatible
-
toString
-
moveItemToEmptySlots
-
moveItemToOccupiedSlotsWithSameType
-
moveItemsBetweenStacks
-
fromTag
-
createTag
-