Package net.minecraft.inventory
Class Inventory
java.lang.Object
net.minecraft.inventory.Inventory
- All Implemented Interfaces:
IClearable
,IInventory
,IRecipeHelperPopulator
- Direct Known Subclasses:
ComposterBlock.EmptyInventory
,ComposterBlock.FullInventory
,ComposterBlock.PartialInventory
,EnderChestInventory
-
Field Summary
Modifier and TypeFieldDescriptionprivate final NonNullList<ItemStack>
private List<IInventoryChangedListener>
private final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IInventoryChangedListener p_110134_1_) boolean
canAddItem
(ItemStack p_233541_1_) void
void
fillStackedContents
(RecipeItemHelper p_194018_1_) void
int
getItem
(int p_70301_1_) boolean
isEmpty()
private boolean
isSameItem
(ItemStack p_233540_1_, ItemStack p_233540_2_) private void
moveItemsBetweenStacks
(ItemStack p_223373_1_, ItemStack p_223373_2_) private void
moveItemToEmptySlots
(ItemStack p_223375_1_) private void
moveItemToOccupiedSlotsWithSameType
(ItemStack p_223372_1_) removeItem
(int p_70298_1_, int p_70298_2_) removeItemNoUpdate
(int p_70304_1_) removeItemType
(Item p_223374_1_, int p_223374_2_) void
removeListener
(IInventoryChangedListener p_110132_1_) void
void
boolean
stillValid
(PlayerEntity p_70300_1_) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.inventory.IInventory
canPlaceItem, countItem, getMaxStackSize, hasAnyOf, startOpen, stopOpen
-
Field Details
-
size
private final int size -
items
-
listeners
-
-
Constructor Details
-
Inventory
public Inventory(int p_i50397_1_) -
Inventory
-
-
Method Details
-
addListener
-
removeListener
-
getItem
- Specified by:
getItem
in interfaceIInventory
-
removeAllItems
-
removeItem
- Specified by:
removeItem
in interfaceIInventory
-
removeItemType
-
addItem
-
canAddItem
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdate
in interfaceIInventory
-
setItem
- Specified by:
setItem
in interfaceIInventory
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceIInventory
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceIInventory
-
setChanged
public void setChanged()- Specified by:
setChanged
in interfaceIInventory
-
stillValid
- Specified by:
stillValid
in interfaceIInventory
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceIClearable
-
fillStackedContents
- Specified by:
fillStackedContents
in interfaceIRecipeHelperPopulator
-
toString
-
moveItemToEmptySlots
-
moveItemToOccupiedSlotsWithSameType
-
isSameItem
-
moveItemsBetweenStacks
-
fromTag
-
createTag
-