Package net.minecraft.src
Class TileEntity
java.lang.Object
net.minecraft.src.TileEntity
- Direct Known Subclasses:
AnvilTileEntity,ArcaneVesselTileEntity,BasketTileEntity,BlockDispenserTileEntity,CampfireTileEntity,CementTileEntity,CookingVesselTileEntity,FiniteTorchTileEntity,HopperTileEntity,InfernalEnchanterTileEntity,LoomTileEntity,MillstoneTileEntity,PlacedToolTileEntity,PulleyTileEntity,TileEntityBeacon,TileEntityBrewingStand,TileEntityChest,TileEntityCommandBlock,TileEntityComparator,TileEntityDaylightDetector,TileEntityDispenser,TileEntityEnchantmentTable,TileEntityEnderChest,TileEntityEndPortal,TileEntityFurnace,TileEntityHopper,TileEntityMobSpawner,TileEntityNote,TileEntityPiston,TileEntityRecordPlayer,TileEntitySign,TileEntitySkull,TurntableTileEntity,UnfiredBrickTileEntity,VaseTileEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionintthe Block type that this TileEntity is contained withinprotected booleanThe reference to the world.intThe x coordinate of the tile entity.intThe y coordinate of the tile entity.intThe z coordinate of the tile entity. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMapping(Class par0Class, String par1Str) Adds a new two-way mapping between the class and its string name in both hashmaps.static TileEntitycreateAndLoadEntity(NBTTagCompound par0NBTTagCompound) Creates a new entity and loads its data from the specified NBT.voidfunc_85027_a(CrashReportCategory par1CrashReportCategory) intReturns block data at the location of this entity (client-only).Gets the block type at the location of this entity (client-only).Overriden in a sign to provide the text.doublegetDistanceFrom(double par1, double par3, double par5) Returns the square of the distance between this entity and the passed in coordinates.doubleReturns the worldObj for this tileEntity.booleanReturns true if the worldObj isn't null.voidinvalidates a tile entitybooleanreturns true if tile entity is invalid, false otherwisevoidCalled when an the contents of an Inventory change, usuallyvoidreadFromNBT(NBTTagCompound par1NBTTagCompound) Reads a tile entity from NBT.booleanreceiveClientEvent(int par1, int par2) Called when a client event is received with the event number and argument, see World.sendClientEventvoidsetWorldObj(World par1World) Sets the worldObj for this tileEntity.voidCauses 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 checkvoidAllows the entity to update its state.voidvalidate()validates a tile entityvoidwriteToNBT(NBTTagCompound par1NBTTagCompound) Writes a tile entity to NBT.
-
Field Details
-
worldObj
The reference to the world. -
xCoord
public int xCoordThe x coordinate of the tile entity. -
yCoord
public int yCoordThe y coordinate of the tile entity. -
zCoord
public int zCoordThe z coordinate of the tile entity. -
tileEntityInvalid
protected boolean tileEntityInvalid -
blockMetadata
public int blockMetadata -
blockType
the Block type that this TileEntity is contained within
-
-
Constructor Details
-
TileEntity
public TileEntity()
-
-
Method Details
-
addMapping
Adds a new two-way mapping between the class and its string name in both hashmaps. -
getWorldObj
Returns the worldObj for this tileEntity. -
setWorldObj
Sets the worldObj for this tileEntity. -
hasWorldObj
public boolean hasWorldObj()Returns true if the worldObj isn't null. -
readFromNBT
Reads a tile entity from NBT. -
writeToNBT
Writes a tile entity to NBT. -
updateEntity
public void updateEntity()Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count ticks and creates a new spawn inside its implementation. -
createAndLoadEntity
Creates a new entity and loads its data from the specified NBT. -
getBlockMetadata
public int getBlockMetadata()Returns block data at the location of this entity (client-only). -
onInventoryChanged
public void onInventoryChanged()Called when an the contents of an Inventory change, usually -
getDistanceFrom
public double getDistanceFrom(double par1, double par3, double par5) Returns the square of the distance between this entity and the passed in coordinates. -
getMaxRenderDistanceSquared
public double getMaxRenderDistanceSquared() -
getBlockType
Gets the block type at the location of this entity (client-only). -
getDescriptionPacket
Overriden in a sign to provide the text. -
isInvalid
public boolean isInvalid()returns true if tile entity is invalid, false otherwise -
invalidate
public void invalidate()invalidates a tile entity -
validate
public void validate()validates a tile entity -
receiveClientEvent
public boolean receiveClientEvent(int par1, int par2) Called when a client event is received with the event number and argument, see World.sendClientEvent -
updateContainingBlockInfo
public 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 -
func_85027_a
-