public abstract class TileEntity
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Block |
blockType |
static AxisAlignedBB |
INFINITE_EXTENT_AABB
Sometimes default render bounding box: infinite in scope.
|
protected BlockPos |
pos |
protected boolean |
tileEntityInvalid |
protected World |
worldObj |
Constructor and Description |
---|
TileEntity() |
Modifier and Type | Method and Description |
---|---|
void |
addInfoToCrashReport(CrashReportCategory reportCategory) |
static void |
addMapping(java.lang.Class cl,
java.lang.String id) |
boolean |
canRenderBreaking()
Checks if this tile entity knows how to render its 'breaking' overlay effect.
|
static TileEntity |
createAndLoadEntity(NBTTagCompound nbt) |
int |
getBlockMetadata() |
Block |
getBlockType() |
Packet |
getDescriptionPacket() |
double |
getDistanceSq(double x,
double y,
double z) |
double |
getMaxRenderDistanceSquared() |
BlockPos |
getPos() |
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 |
getWorld() |
boolean |
hasWorldObj() |
void |
invalidate() |
boolean |
isInvalid() |
void |
markDirty() |
void |
onChunkUnload()
Called when the chunk this TileEntity is on is Unloaded.
|
void |
onDataPacket(NetworkManager net,
S35PacketUpdateTileEntity pkt)
Called when you receive a TileEntityData packet for the location this
TileEntity is currently in.
|
void |
readFromNBT(NBTTagCompound compound) |
boolean |
receiveClientEvent(int id,
int type) |
void |
setPos(BlockPos posIn) |
void |
setWorldObj(World worldIn) |
boolean |
shouldRefresh(World world,
BlockPos pos,
IBlockState oldState,
IBlockState newSate)
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() |
void |
validate() |
void |
writeToNBT(NBTTagCompound compound) |
protected World worldObj
protected BlockPos pos
protected boolean tileEntityInvalid
protected Block blockType
public static final AxisAlignedBB INFINITE_EXTENT_AABB
TileEntitySpecialRenderer
.public static void addMapping(java.lang.Class cl, java.lang.String id)
public World getWorld()
public void setWorldObj(World worldIn)
public boolean hasWorldObj()
public void readFromNBT(NBTTagCompound compound)
public void writeToNBT(NBTTagCompound compound)
public static TileEntity createAndLoadEntity(NBTTagCompound nbt)
public int getBlockMetadata()
public void markDirty()
public double getDistanceSq(double x, double y, double z)
public double getMaxRenderDistanceSquared()
public BlockPos getPos()
public Block getBlockType()
public Packet getDescriptionPacket()
public boolean isInvalid()
public void invalidate()
public void validate()
public boolean receiveClientEvent(int id, int type)
public void updateContainingBlockInfo()
public void addInfoToCrashReport(CrashReportCategory reportCategory)
public void setPos(BlockPos posIn)
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
net
- The NetworkManager the packet originated frompkt
- The data packetpublic void onChunkUnload()
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)
world
- Current worldpos
- Tile's world positionoldID
- The old ID of the blocknewID
- The new ID of the block (May be the same)public 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
public boolean canRenderBreaking()