public class Inventory
extends java.lang.Object
implements net.minecraft.inventory.IInventory
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.item.ItemStack[] |
items |
| Constructor and Description |
|---|
Inventory(net.minecraft.util.text.ITextComponent name,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
closeInventory(net.minecraft.entity.player.EntityPlayer player) |
net.minecraft.item.ItemStack |
decrStackSize(int index,
int count) |
net.minecraft.util.text.ITextComponent |
getCustomName() |
net.minecraft.util.text.ITextComponent |
getDisplayName() |
int |
getField(int id) |
int |
getFieldCount() |
int |
getInventoryStackLimit() |
net.minecraft.util.text.ITextComponent |
getName() |
int |
getSizeInventory() |
net.minecraft.item.ItemStack |
getStackInSlot(int index) |
boolean |
hasCustomName() |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack) |
boolean |
isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player) |
void |
markDirty() |
protected void |
onItemAdded(int index) |
protected void |
onItemRemoved(int index) |
void |
openInventory(net.minecraft.entity.player.EntityPlayer player) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
net.minecraft.item.ItemStack |
removeStackFromSlot(int index) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack) |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
public Inventory(net.minecraft.util.text.ITextComponent name,
int size)
public void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
protected void onItemAdded(int index)
protected void onItemRemoved(int index)
public net.minecraft.util.text.ITextComponent getName()
getName in interface net.minecraft.util.INameablepublic boolean hasCustomName()
hasCustomName in interface net.minecraft.util.INameablepublic net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName in interface net.minecraft.util.INameable@Nullable public net.minecraft.util.text.ITextComponent getCustomName()
getCustomName in interface net.minecraft.util.INameablepublic int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic boolean isEmpty()
isEmpty in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlot(int index)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int index,
int count)
decrStackSize in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic void markDirty()
markDirty in interface net.minecraft.inventory.IInventorypublic boolean isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player)
isUsableByPlayer in interface net.minecraft.inventory.IInventorypublic void openInventory(net.minecraft.entity.player.EntityPlayer player)
openInventory in interface net.minecraft.inventory.IInventorypublic void closeInventory(net.minecraft.entity.player.EntityPlayer player)
closeInventory in interface net.minecraft.inventory.IInventorypublic boolean isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack)
isItemValidForSlot in interface net.minecraft.inventory.IInventorypublic int getField(int id)
getField in interface net.minecraft.inventory.IInventorypublic void setField(int id,
int value)
setField in interface net.minecraft.inventory.IInventorypublic int getFieldCount()
getFieldCount in interface net.minecraft.inventory.IInventorypublic void clear()
clear in interface net.minecraft.inventory.IInventory