public abstract class TileEntity
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
blockMetadata |
protected Block |
blockType
the Block type that this TileEntity is contained within
|
private static java.util.Map<java.lang.Class<? extends TileEntity>,java.lang.String> |
classToNameMap |
private static org.apache.logging.log4j.Logger |
logger |
private static java.util.Map<java.lang.String,java.lang.Class<? extends TileEntity>> |
nameToClassMap |
protected BlockPos |
pos |
protected boolean |
tileEntityInvalid |
protected World |
worldObj
the instance of the world the tile entity is in.
|
Constructor and Description |
---|
TileEntity() |
Modifier and Type | Method and Description |
---|---|
void |
addInfoToCrashReport(CrashReportCategory reportCategory) |
private static void |
addMapping(java.lang.Class<? extends TileEntity> cl,
java.lang.String id)
Adds a new two-way mapping between the class and its string name in both hashmaps.
|
static TileEntity |
createAndLoadEntity(NBTTagCompound nbt)
Creates a new entity and loads its data from the specified NBT.
|
boolean |
func_183000_F() |
int |
getBlockMetadata() |
Block |
getBlockType()
Gets the block type at the location of this entity (client-only).
|
Packet |
getDescriptionPacket()
Allows for a specialized description packet to be created.
|
double |
getDistanceSq(double x,
double y,
double z)
Returns the square of the distance between this entity and the passed in coordinates.
|
double |
getMaxRenderDistanceSquared() |
BlockPos |
getPos() |
World |
getWorld()
Returns the worldObj for this tileEntity.
|
boolean |
hasWorldObj()
Returns true if the worldObj isn't null.
|
void |
invalidate()
invalidates a tile entity
|
boolean |
isInvalid() |
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
void |
readFromNBT(NBTTagCompound compound) |
boolean |
receiveClientEvent(int id,
int type) |
void |
setPos(BlockPos posIn) |
void |
setWorldObj(World worldIn)
Sets the worldObj for this tileEntity.
|
void |
updateContainingBlockInfo() |
void |
validate()
validates a tile entity
|
void |
writeToNBT(NBTTagCompound compound) |
private static final org.apache.logging.log4j.Logger logger
private static java.util.Map<java.lang.String,java.lang.Class<? extends TileEntity>> nameToClassMap
private static java.util.Map<java.lang.Class<? extends TileEntity>,java.lang.String> classToNameMap
protected World worldObj
protected BlockPos pos
protected boolean tileEntityInvalid
private int blockMetadata
protected Block blockType
private static void addMapping(java.lang.Class<? extends TileEntity> 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 boolean func_183000_F()