public class TileEntity extends Object
Modifier and Type | Field and Description |
---|---|
int |
blockMetadata |
Block |
blockType
the Block type that this TileEntity is contained within
|
static AxisAlignedBB |
INFINITE_EXTENT_AABB
Sometimes default render bounding box: infinite in scope.
|
World |
worldObj
The reference to the world.
|
int |
xCoord
The x coordinate of the tile entity.
|
int |
yCoord
The y coordinate of the tile entity.
|
int |
zCoord
The z coordinate of the tile entity.
|
Constructor and Description |
---|
TileEntity() |
Modifier and Type | Method and Description |
---|---|
static void |
addMapping(Class par0Class,
String par1Str)
Adds a new two-way mapping between the class and its string name in both hashmaps.
|
boolean |
canUpdate()
Determines if this TileEntity requires update calls.
|
static TileEntity |
createAndLoadEntity(NBTTagCompound par0NBTTagCompound)
Creates a new entity and loads its data from the specified NBT.
|
boolean |
func_70309_m() |
void |
func_85027_a(CrashReportCategory par1CrashReportCategory) |
int |
getBlockMetadata()
Returns block data at the location of this entity (client-only).
|
Block |
getBlockType()
Gets the block type at the location of this entity (client-only).
|
Packet |
getDescriptionPacket()
Overriden in a sign to provide the text.
|
double |
getDistanceFrom(double par1,
double par3,
double par5) |
double |
getMaxRenderDistanceSquared() |
AxisAlignedBB |
getRenderBoundingBox()
Return an
AxisAlignedBB that controls the visible scope of a TileEntitySpecialRenderer associated with this TileEntity
Defaults to the collision bounding box Block.getCollisionBoundingBoxFromPool(World, int, int, int) associated with the block
at this location. |
World |
getWorldObj()
Returns the worldObj for this tileEntity.
|
void |
invalidate()
invalidates a tile entity
|
boolean |
isInvalid()
returns true if tile entity is invalid, false otherwise
|
void |
onChunkUnload()
Called when the chunk this TileEntity is on is Unloaded.
|
void |
onDataPacket(INetworkManager net,
Packet132TileEntityData pkt)
Called when you receive a TileEntityData packet for the location this
TileEntity is currently in.
|
void |
onInventoryChanged()
Called when an the contents of an Inventory change, usually
|
void |
readFromNBT(NBTTagCompound par1NBTTagCompound)
Reads a tile entity from NBT.
|
boolean |
receiveClientEvent(int par1,
int par2)
Called when a client event is received with the event number and argument, see World.sendClientEvent
|
void |
setWorldObj(World par1World)
Sets the worldObj for this tileEntity.
|
boolean |
shouldRefresh(int oldID,
int newID,
int oldMeta,
int newMeta,
World world,
int x,
int y,
int z)
Called from Chunk.setBlockIDWithMetadata, determines if this tile entity should be re-created when the ID, or Metadata changes.
|
boolean |
shouldRenderInPass(int pass) |
void |
updateContainingBlockInfo()
Causes the TileEntity to reset all it's cached values for it's container block, blockID, metaData and in the case
of chests, the adjcacent chest check
|
void |
updateEntity()
Allows the entity to update its state.
|
void |
validate()
validates a tile entity
|
void |
writeToNBT(NBTTagCompound par1NBTTagCompound)
Writes a tile entity to NBT.
|
public World worldObj
public int xCoord
public int yCoord
public int zCoord
public int blockMetadata
public Block blockType
public static final AxisAlignedBB INFINITE_EXTENT_AABB
TileEntitySpecialRenderer
.public static void addMapping(Class par0Class, String par1Str)
public World getWorldObj()
public void setWorldObj(World par1World)
public boolean func_70309_m()
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
public void updateEntity()
public static TileEntity createAndLoadEntity(NBTTagCompound par0NBTTagCompound)
public int getBlockMetadata()
public void onInventoryChanged()
public double getDistanceFrom(double par1, double par3, double par5)
public double getMaxRenderDistanceSquared()
public Block getBlockType()
public Packet getDescriptionPacket()
public boolean isInvalid()
public void invalidate()
public void validate()
public boolean receiveClientEvent(int par1, int par2)
public void updateContainingBlockInfo()
public void func_85027_a(CrashReportCategory par1CrashReportCategory)
public boolean canUpdate()
public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
net
- The NetworkManager the packet originated frompkt
- The data packetpublic void onChunkUnload()
public boolean shouldRefresh(int oldID, int newID, int oldMeta, int newMeta, World world, int x, int y, int z)
oldID
- The old ID of the blocknewID
- The new ID of the block (May be the same)oldMeta
- The old metadata of the blocknewMeta
- The new metadata of the block (May be the same)world
- Current worldx
- X Postiony
- Y Positionz
- Z Positionpublic boolean shouldRenderInPass(int pass)
public AxisAlignedBB getRenderBoundingBox()
AxisAlignedBB
that controls the visible scope of a TileEntitySpecialRenderer
associated with this TileEntity
Defaults to the collision bounding box Block.getCollisionBoundingBoxFromPool(World, int, int, int)
associated with the block
at this location.AxisAlignedBB
for the TileEntity