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 voidaddInfoToCrashReport(CrashReportCategory reportCategory)static TileEntitycreateAndLoadEntity(NBTTagCompound nbt)+ Creates a new entity and loads its data from the specified NBT.booleanfunc_183000_F()intgetBlockMetadata()BlockgetBlockType()+ Gets the block type at the location of this entity (client-only).PacketgetDescriptionPacket()+ Allows for a specialized description packet to be created.doublegetDistanceSq(double x, double y, double z)+ Returns the square of the distance between this entity and the passed in coordinates.doublegetMaxRenderDistanceSquared()BlockPosgetPos()WorldgetWorld()+ Returns the worldObj for this tileEntity.booleanhasWorldObj()+ Returns true if the worldObj isn't null.voidinvalidate()+ invalidates a tile entitybooleanisInvalid()voidmarkDirty()+ 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.voidreadFromNBT(NBTTagCompound nbttagcompound)booleanreceiveClientEvent(int var1, int var2)voidsetPos(BlockPos posIn)voidsetWorldObj(World worldIn)+ Sets the worldObj for this tileEntity.voidupdateContainingBlockInfo()voidvalidate()+ validates a tile entityvoidwriteToNBT(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()
-
-