public abstract class ItemInventory extends java.lang.Object implements net.minecraft.inventory.IInventory, IFilterSlotDelegate, net.minecraftforge.common.capabilities.ICapabilityProvider
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.entity.player.EntityPlayer |
player |
| Constructor and Description |
|---|
ItemInventory(net.minecraft.entity.player.EntityPlayer player,
int size,
net.minecraft.item.ItemStack parent) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSlotAccept(int slotIndex,
net.minecraft.item.ItemStack itemStack)
Non-automation version of IInventory's isItemValidForSlot.
|
void |
clear() |
void |
closeInventory(net.minecraft.entity.player.EntityPlayer player) |
net.minecraft.item.ItemStack |
decrStackSize(int index,
int count) |
<T> T |
getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
net.minecraft.util.EnumFacing facing) |
net.minecraft.util.text.ITextComponent |
getDisplayName() |
int |
getField(int id) |
int |
getFieldCount() |
protected net.minecraft.util.EnumHand |
getHand() |
int |
getInventoryStackLimit() |
net.minecraftforge.items.IItemHandler |
getItemHandler() |
java.lang.String |
getName() |
static int |
getOccupiedSlotCount(net.minecraft.item.ItemStack itemStack) |
protected net.minecraft.item.ItemStack |
getParent() |
int |
getSizeInventory() |
net.minecraft.item.ItemStack |
getStackInSlot(int i) |
boolean |
hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability,
net.minecraft.util.EnumFacing facing) |
boolean |
hasCustomName() |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int slotIndex,
net.minecraft.item.ItemStack itemStack) |
boolean |
isLocked(int slotIndex)
Used to lock slots under special conditions.
|
boolean |
isParentItemInventory(net.minecraft.item.ItemStack itemStack) |
boolean |
isUsableByPlayer(net.minecraft.entity.player.EntityPlayer entityplayer) |
void |
markDirty() |
void |
onSlotClick(int slotIndex,
net.minecraft.entity.player.EntityPlayer player) |
protected void |
onWriteNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
openInventory(net.minecraft.entity.player.EntityPlayer player) |
net.minecraft.item.ItemStack |
removeStackFromSlot(int slot) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
net.minecraft.item.ItemStack itemstack) |
public ItemInventory(net.minecraft.entity.player.EntityPlayer player,
int size,
net.minecraft.item.ItemStack parent)
public static int getOccupiedSlotCount(net.minecraft.item.ItemStack itemStack)
public boolean isParentItemInventory(net.minecraft.item.ItemStack itemStack)
protected net.minecraft.item.ItemStack getParent()
@Nullable protected net.minecraft.util.EnumHand getHand()
protected void onWriteNBT(net.minecraft.nbt.NBTTagCompound nbt)
public void onSlotClick(int slotIndex,
net.minecraft.entity.player.EntityPlayer player)
public boolean isEmpty()
isEmpty in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int index,
int count)
decrStackSize in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int index,
net.minecraft.item.ItemStack itemstack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlot(int i)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic java.lang.String getName()
getName in interface net.minecraft.world.IWorldNameablepublic net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName in interface net.minecraft.world.IWorldNameablepublic int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic final void markDirty()
markDirty in interface net.minecraft.inventory.IInventorypublic boolean isUsableByPlayer(net.minecraft.entity.player.EntityPlayer entityplayer)
isUsableByPlayer in interface net.minecraft.inventory.IInventorypublic boolean hasCustomName()
hasCustomName in interface net.minecraft.world.IWorldNameablepublic boolean isItemValidForSlot(int slotIndex,
net.minecraft.item.ItemStack itemStack)
isItemValidForSlot 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 net.minecraft.item.ItemStack removeStackFromSlot(int slot)
removeStackFromSlot in interface net.minecraft.inventory.IInventorypublic boolean canSlotAccept(int slotIndex,
net.minecraft.item.ItemStack itemStack)
IFilterSlotDelegateCombine this with Forestry's access permissions to implement isItemValidForSlot.
canSlotAccept in interface IFilterSlotDelegatepublic boolean isLocked(int slotIndex)
IFilterSlotDelegateisLocked in interface IFilterSlotDelegatepublic int getField(int id)
getField in interface net.minecraft.inventory.IInventorypublic int getFieldCount()
getFieldCount in interface net.minecraft.inventory.IInventorypublic void clear()
clear in interface net.minecraft.inventory.IInventorypublic void setField(int id,
int value)
setField in interface net.minecraft.inventory.IInventory@Nullable
public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
@Nullable
net.minecraft.util.EnumFacing facing)
getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProviderpublic boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability,
@Nullable
net.minecraft.util.EnumFacing facing)
hasCapability in interface net.minecraftforge.common.capabilities.ICapabilityProviderpublic net.minecraftforge.items.IItemHandler getItemHandler()