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

public class TileEntity extends Object
  • Field Details

    • worldObj

      public World worldObj
      The reference to the world.
    • xCoord

      public int xCoord
      The x coordinate of the tile entity.
    • yCoord

      public int yCoord
      The y coordinate of the tile entity.
    • zCoord

      public int zCoord
      The z coordinate of the tile entity.
    • tileEntityInvalid

      protected boolean tileEntityInvalid
    • blockMetadata

      public int blockMetadata
    • blockType

      public Block blockType
      the Block type that this TileEntity is contained within
  • Constructor Details

    • TileEntity

      public TileEntity()
  • Method Details

    • addMapping

      public static void addMapping(Class par0Class, String par1Str)
      Adds a new two-way mapping between the class and its string name in both hashmaps.
    • getWorldObj

      public World getWorldObj()
      Returns the worldObj for this tileEntity.
    • setWorldObj

      public void setWorldObj(World par1World)
      Sets the worldObj for this tileEntity.
    • hasWorldObj

      public boolean hasWorldObj()
      Returns true if the worldObj isn't null.
    • readFromNBT

      public void readFromNBT(NBTTagCompound par1NBTTagCompound)
      Reads a tile entity from NBT.
    • writeToNBT

      public void writeToNBT(NBTTagCompound par1NBTTagCompound)
      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

      public static TileEntity createAndLoadEntity(NBTTagCompound par0NBTTagCompound)
      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

      public Block getBlockType()
      Gets the block type at the location of this entity (client-only).
    • getDescriptionPacket

      public Packet 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

      public void func_85027_a(CrashReportCategory par1CrashReportCategory)