public class InventoryAdapter extends java.lang.Object implements IInventoryAdapter, IStreamable
| Constructor and Description |
|---|
InventoryAdapter(net.minecraft.inventory.IInventory inventory) |
InventoryAdapter(int size,
java.lang.String name) |
InventoryAdapter(int size,
java.lang.String name,
int stackLimit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExtractItem(int slot,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing side) |
boolean |
canInsertItem(int slot,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing side) |
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) |
InventoryAdapter |
copy() |
net.minecraft.item.ItemStack |
decrStackSize(int slotId,
int count) |
InventoryAdapter |
disableAutomation() |
net.minecraft.util.text.ITextComponent |
getDisplayName() |
int |
getField(int id) |
int |
getFieldCount() |
int |
getInventoryStackLimit() |
java.lang.String |
getName() |
int |
getSizeInventory() |
int[] |
getSlotsForFace(net.minecraft.util.EnumFacing side) |
net.minecraft.item.ItemStack |
getStackInSlot(int slotId) |
boolean |
hasCustomName() |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int i,
net.minecraft.item.ItemStack itemstack) |
boolean |
isLocked(int slotIndex)
Used to lock slots under special conditions.
|
boolean |
isUsableByPlayer(net.minecraft.entity.player.EntityPlayer entityplayer) |
void |
markDirty() |
void |
openInventory(net.minecraft.entity.player.EntityPlayer player) |
void |
readData(PacketBufferForestry data) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
net.minecraft.item.ItemStack |
removeStackFromSlot(int slotIndex) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int slotId,
net.minecraft.item.ItemStack itemstack) |
void |
writeData(PacketBufferForestry data) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
public InventoryAdapter(int size,
java.lang.String name)
public InventoryAdapter(int size,
java.lang.String name,
int stackLimit)
public InventoryAdapter(net.minecraft.inventory.IInventory inventory)
public InventoryAdapter disableAutomation()
public InventoryAdapter copy()
public boolean isEmpty()
isEmpty in interface net.minecraft.inventory.IInventorypublic int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlot(int slotId)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int slotId,
int count)
decrStackSize in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int slotId,
net.minecraft.item.ItemStack itemstack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic java.lang.String getName()
getName in interface net.minecraft.world.IWorldNameablepublic int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic void markDirty()
markDirty in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack removeStackFromSlot(int slotIndex)
removeStackFromSlot 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 net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName in interface net.minecraft.world.IWorldNameablepublic boolean isItemValidForSlot(int i,
net.minecraft.item.ItemStack itemstack)
isItemValidForSlot 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 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 int[] getSlotsForFace(net.minecraft.util.EnumFacing side)
getSlotsForFace in interface net.minecraft.inventory.ISidedInventorypublic boolean canInsertItem(int slot,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing side)
canInsertItem in interface net.minecraft.inventory.ISidedInventorypublic boolean canExtractItem(int slot,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing side)
canExtractItem in interface net.minecraft.inventory.ISidedInventorypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
readFromNBT in interface INbtReadablepublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
writeToNBT in interface INbtWritablepublic void writeData(PacketBufferForestry data)
writeData in interface IStreamablepublic void readData(PacketBufferForestry data) throws java.io.IOException
readData in interface IStreamablejava.io.IOExceptionpublic int getField(int id)
getField in interface net.minecraft.inventory.IInventorypublic int getFieldCount()
getFieldCount in interface net.minecraft.inventory.IInventorypublic void setField(int id,
int value)
setField in interface net.minecraft.inventory.IInventorypublic void clear()
clear in interface net.minecraft.inventory.IInventory