Package net.minecraft.tileentity
Class TileEntity
- java.lang.Object
-
- net.minecraft.tileentity.TileEntity
-
- Direct Known Subclasses:
BlockJukebox.TileEntityJukebox
,TileEntityBanner
,TileEntityCommandBlock
,TileEntityComparator
,TileEntityDaylightDetector
,TileEntityEnchantmentTable
,TileEntityEnderChest
,TileEntityEndPortal
,TileEntityFlowerPot
,TileEntityLockable
,TileEntityMobSpawner
,TileEntityNote
,TileEntityPiston
,TileEntitySign
,TileEntitySkull
public abstract class TileEntity extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TileEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInfoToCrashReport(CrashReportCategory reportCategory)
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 entityboolean
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 nbttagcompound)
boolean
receiveClientEvent(int var1, int var2)
void
setPos(BlockPos posIn)
void
setWorldObj(World worldIn)
+ Sets the worldObj for this tileEntity.void
updateContainingBlockInfo()
void
validate()
+ validates a tile entityvoid
writeToNBT(NBTTagCompound nbttagcompound)
-
-
-
Method Detail
-
getWorld
public World getWorld()
+ Returns the worldObj for this tileEntity.
-
setWorldObj
public void setWorldObj(World worldIn)
+ Sets the worldObj for this tileEntity.
-
hasWorldObj
public boolean hasWorldObj()
+ Returns true if the worldObj isn't null.
-
readFromNBT
public void readFromNBT(NBTTagCompound nbttagcompound)
-
writeToNBT
public void writeToNBT(NBTTagCompound nbttagcompound)
-
createAndLoadEntity
public static TileEntity createAndLoadEntity(NBTTagCompound nbt)
+ Creates a new entity and loads its data from the specified NBT.
-
getBlockMetadata
public int getBlockMetadata()
-
markDirty
public 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.
-
getDistanceSq
public double getDistanceSq(double x, double y, double z)
+ Returns the square of the distance between this entity and the passed in coordinates.
-
getMaxRenderDistanceSquared
public double getMaxRenderDistanceSquared()
-
getPos
public BlockPos getPos()
-
getBlockType
public Block getBlockType()
+ Gets the block type at the location of this entity (client-only).
-
getDescriptionPacket
public Packet getDescriptionPacket()
+ Allows for a specialized description packet to be created. This is often used to sync tile entity data from the server to the client easily. For example this is used by signs to synchronise the text to be displayed.
-
isInvalid
public boolean isInvalid()
-
invalidate
public void invalidate()
+ invalidates a tile entity
-
validate
public void validate()
+ validates a tile entity
-
receiveClientEvent
public boolean receiveClientEvent(int var1, int var2)
-
updateContainingBlockInfo
public void updateContainingBlockInfo()
-
addInfoToCrashReport
public void addInfoToCrashReport(CrashReportCategory reportCategory)
-
setPos
public void setPos(BlockPos posIn)
-
func_183000_F
public boolean func_183000_F()
-
-