public abstract class InventoryTileEntity extends EvilCraftTileEntity implements net.minecraft.inventory.ISidedInventory
| Modifier and Type | Field and Description |
|---|---|
protected SimpleInventory |
inventory |
protected boolean |
sendUpdateOnInventoryChanged |
protected java.util.Map<net.minecraftforge.common.util.ForgeDirection,int[]> |
slotSides |
protected java.util.Map<net.minecraftforge.common.util.ForgeDirection,java.lang.Integer> |
slotSidesSize |
| Constructor and Description |
|---|
InventoryTileEntity(int inventorySize,
java.lang.String inventoryName)
Make new tile with an inventory.
|
InventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize)
Make new tile with an inventory.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSlotsToSide(net.minecraftforge.common.util.ForgeDirection side,
java.util.Collection<java.lang.Integer> slots)
Add mappings to slots to a certain (normalized) side of this TileEntity.
|
boolean |
canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
int side) |
boolean |
canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack,
int side) |
void |
closeInventory() |
net.minecraft.item.ItemStack |
decrStackSize(int slotId,
int count) |
int[] |
getAccessibleSlotsFromSide(int side) |
SimpleInventory |
getInventory()
Get the internal inventory.
|
java.lang.String |
getInventoryName() |
int |
getInventoryStackLimit() |
int |
getSizeInventory() |
net.minecraft.item.ItemStack |
getStackInSlot(int slotId) |
net.minecraft.item.ItemStack |
getStackInSlotOnClosing(int slotId) |
boolean |
hasCustomInventoryName() |
boolean |
isSendUpdateOnInventoryChanged()
If this tile should send block updates when the inventory has changed.
|
boolean |
isUseableByPlayer(net.minecraft.entity.player.EntityPlayer entityPlayer) |
protected void |
onInventoryChanged() |
void |
openInventory() |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
void |
setInventorySlotContents(int slotId,
net.minecraft.item.ItemStack itemstack) |
void |
setSendUpdateOnInventoryChanged(boolean sendUpdateOnInventoryChanged)
If this tile should send block updates when the inventory has changed.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
afterSendUpdate, beforeSendUpdate, canInteractWith, destroy, getBlock, getDescriptionPacket, getNBTTagCompound, getRotation, getUpdateBackoffTicks, isRotatable, isTileValid, onDataPacket, onLoad, onSendUpdate, onUpdateReceived, sendImmediateUpdate, sendUpdate, setRotatable, setRotation, updateEntity, updateTileEntityaddMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateprotected SimpleInventory inventory
protected java.util.Map<net.minecraftforge.common.util.ForgeDirection,int[]> slotSides
protected java.util.Map<net.minecraftforge.common.util.ForgeDirection,java.lang.Integer> slotSidesSize
protected boolean sendUpdateOnInventoryChanged
public InventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.stackSize - The maximum stacksize each slot can havepublic InventoryTileEntity(int inventorySize,
java.lang.String inventoryName)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.protected void addSlotsToSide(net.minecraftforge.common.util.ForgeDirection side,
java.util.Collection<java.lang.Integer> slots)
side - The side to map this slots to.slots - The numerical representations of the slots to map.public SimpleInventory getInventory()
public 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 net.minecraft.item.ItemStack getStackInSlotOnClosing(int slotId)
getStackInSlotOnClosing in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int slotId,
net.minecraft.item.ItemStack itemstack)
setInventorySlotContents in interface net.minecraft.inventory.IInventoryprotected void onInventoryChanged()
public java.lang.String getInventoryName()
getInventoryName in interface net.minecraft.inventory.IInventorypublic boolean hasCustomInventoryName()
hasCustomInventoryName in interface net.minecraft.inventory.IInventorypublic int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic boolean isUseableByPlayer(net.minecraft.entity.player.EntityPlayer entityPlayer)
isUseableByPlayer in interface net.minecraft.inventory.IInventorypublic void openInventory()
openInventory in interface net.minecraft.inventory.IInventorypublic void closeInventory()
closeInventory in interface net.minecraft.inventory.IInventorypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class EvilCraftTileEntitypublic void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class EvilCraftTileEntitypublic int[] getAccessibleSlotsFromSide(int side)
getAccessibleSlotsFromSide in interface net.minecraft.inventory.ISidedInventorypublic boolean canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack,
int side)
canInsertItem in interface net.minecraft.inventory.ISidedInventorypublic boolean canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
int side)
canExtractItem in interface net.minecraft.inventory.ISidedInventorypublic boolean isSendUpdateOnInventoryChanged()
public void setSendUpdateOnInventoryChanged(boolean sendUpdateOnInventoryChanged)
sendUpdateOnInventoryChanged - If it should send block updates.