public class Inventory extends java.lang.Object implements IInventory, IRecipeHelperPopulator
| Modifier and Type | Field and Description |
|---|---|
private NonNullList<ItemStack> |
inventoryContents |
private java.util.List<IInventoryChangedListener> |
listeners |
private int |
slotsCount |
| Constructor and Description |
|---|
Inventory(int numSlots) |
Inventory(ItemStack... stacksIn) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
addItem(ItemStack stack) |
void |
addListener(IInventoryChangedListener listener) |
void |
clear() |
ItemStack |
decrStackSize(int index,
int count) |
void |
fillStackedContents(RecipeItemHelper helper) |
private void |
func_223372_c(ItemStack p_223372_1_) |
private void |
func_223373_a(ItemStack p_223373_1_,
ItemStack p_223373_2_) |
ItemStack |
func_223374_a(Item p_223374_1_,
int p_223374_2_) |
private void |
func_223375_b(ItemStack p_223375_1_) |
int |
getSizeInventory() |
ItemStack |
getStackInSlot(int index) |
boolean |
isEmpty() |
boolean |
isUsableByPlayer(PlayerEntity player) |
void |
markDirty() |
void |
removeListener(IInventoryChangedListener listener) |
ItemStack |
removeStackFromSlot(int index) |
void |
setInventorySlotContents(int index,
ItemStack stack) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloseInventory, count, getInventoryStackLimit, hasAny, isItemValidForSlot, openInventoryclearObjprivate final int slotsCount
private final NonNullList<ItemStack> inventoryContents
private java.util.List<IInventoryChangedListener> listeners
public Inventory(int numSlots)
public Inventory(ItemStack... stacksIn)
public void addListener(IInventoryChangedListener listener)
public void removeListener(IInventoryChangedListener listener)
public ItemStack getStackInSlot(int index)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize in interface IInventorypublic ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface IInventorypublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents in interface IInventorypublic int getSizeInventory()
getSizeInventory in interface IInventorypublic boolean isEmpty()
isEmpty in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer in interface IInventorypublic void clear()
clear in interface IClearablepublic void fillStackedContents(RecipeItemHelper helper)
fillStackedContents in interface IRecipeHelperPopulatorpublic java.lang.String toString()
toString in class java.lang.Objectprivate void func_223375_b(ItemStack p_223375_1_)
private void func_223372_c(ItemStack p_223372_1_)