public class Inventory extends java.lang.Object implements IInventory, IRecipeHelperPopulator
修飾子とタイプ | メソッドと説明 |
---|---|
ItemStack |
addItem(ItemStack stack) |
void |
addListener(IInventoryChangedListener listener)
Add a listener that will be notified when any item in this inventory is modified.
|
void |
clear() |
ItemStack |
decrStackSize(int index,
int count)
Removes up to a specified number of items from an inventory slot and returns them in a new stack.
|
void |
fillStackedContents(RecipeItemHelper helper) |
ItemStack |
func_223374_a(Item p_223374_1_,
int p_223374_2_) |
int |
getSizeInventory()
Returns the number of slots in the inventory.
|
ItemStack |
getStackInSlot(int index)
Returns the stack in the given slot.
|
boolean |
isEmpty() |
boolean |
isUsableByPlayer(PlayerEntity player)
Don't rename this method to canInteractWith due to conflicts with Container
|
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
void |
removeListener(IInventoryChangedListener listener)
removes the specified IInvBasic from receiving further change notices
|
ItemStack |
removeStackFromSlot(int index)
Removes a stack from the given slot and returns it.
|
void |
setInventorySlotContents(int index,
ItemStack stack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
closeInventory, count, getInventoryStackLimit, hasAny, isItemValidForSlot, openInventory
clearObj
public Inventory(int numSlots)
public Inventory(ItemStack... stacksIn)
public void addListener(IInventoryChangedListener listener)
public void removeListener(IInventoryChangedListener listener)
public ItemStack getStackInSlot(int index)
getStackInSlot
インタフェース内 IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
インタフェース内 IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
インタフェース内 IInventory
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
インタフェース内 IInventory
public int getSizeInventory()
getSizeInventory
インタフェース内 IInventory
public boolean isEmpty()
isEmpty
インタフェース内 IInventory
public void markDirty()
markDirty
インタフェース内 IInventory
public boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer
インタフェース内 IInventory
public void clear()
clear
インタフェース内 IClearable
public void fillStackedContents(RecipeItemHelper helper)
fillStackedContents
インタフェース内 IRecipeHelperPopulator
public java.lang.String toString()
toString
クラス内 java.lang.Object