public class InventoryBasic extends java.lang.Object implements IInventory, IRecipeHelperPopulator
| Constructor and Description |
|---|
InventoryBasic(ITextComponent title,
int slotCount) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
addItem(ItemStack stack) |
void |
addListener(IInventoryChangedListener listener) |
void |
clear() |
void |
closeInventory(EntityPlayer player) |
ItemStack |
decrStackSize(int index,
int count) |
void |
fillStackedContents(RecipeItemHelper helper) |
ITextComponent |
getCustomName() |
int |
getField(int id) |
int |
getFieldCount() |
int |
getInventoryStackLimit() |
ITextComponent |
getName() |
int |
getSizeInventory() |
ItemStack |
getStackInSlot(int index) |
boolean |
hasCustomName() |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int index,
ItemStack stack) |
boolean |
isUsableByPlayer(EntityPlayer player) |
void |
markDirty() |
void |
openInventory(EntityPlayer player) |
void |
removeListener(IInventoryChangedListener listener) |
ItemStack |
removeStackFromSlot(int index) |
void |
setCustomName(ITextComponent name) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
ItemStack stack) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeight, getWidthgetDisplayNamepublic InventoryBasic(ITextComponent title, int slotCount)
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 ITextComponent getName()
@Nullable public ITextComponent getCustomName()
getCustomName in interface INameablepublic boolean hasCustomName()
hasCustomName in interface INameablepublic void setCustomName(@Nullable
ITextComponent name)
public int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUsableByPlayer(EntityPlayer player)
isUsableByPlayer in interface IInventorypublic void openInventory(EntityPlayer player)
openInventory in interface IInventorypublic void closeInventory(EntityPlayer player)
closeInventory in interface IInventorypublic boolean isItemValidForSlot(int index,
ItemStack stack)
isItemValidForSlot in interface IInventorypublic int getField(int id)
getField in interface IInventorypublic void setField(int id,
int value)
setField in interface IInventorypublic int getFieldCount()
getFieldCount in interface IInventorypublic void clear()
clear in interface IInventorypublic void fillStackedContents(RecipeItemHelper helper)
fillStackedContents in interface IRecipeHelperPopulator