Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class TileEntity

    java.lang.Object
      net.minecraft.src.TileEntity

Direct Known Subclasses:
  TileEntityBrewingStand, TileEntityChest, TileEntityDispenser, TileEntityEnchantmentTable, TileEntityEnderChest, TileEntityEndPortal, TileEntityFurnace, TileEntityMobSpawner, TileEntityNote, TileEntityPiston, TileEntityRecordPlayer, TileEntitySign

    public class TileEntity

extends Object

Field Summary
`int` | `blockMetadata`
`Block` | `blockType` the Block type that this TileEntity is contained within
`World` | `worldObj` The reference to the world.
`int` | `xCoord` The x coordinate of the tile entity.
`int` | `yCoord` The y coordinate of the tile entity.
`int` | `zCoord` The z coordinate of the tile entity.

Constructor Summary
`TileEntity()`

Method Summary
`static void` | `addMapping(Class par0Class, String par1Str)` Adds a new two-way mapping between the class and its string name in both hashmaps.
`boolean` | `canUpdate()` Determines if this TileEntity requires update calls.
`static TileEntity` | `createAndLoadEntity(NBTTagCompound par0NBTTagCompound)` Creates a new entity and loads its data from the specified NBT.
`boolean` | `func_70309_m()`
`int` | `getBlockMetadata()` Returns block data at the location of this entity (client-only).
`Block` | `getBlockType()`
`Packet` | `getDescriptionPacket()` Overriden in a sign to provide the text.
`double` | `getDistanceFrom(double par1, double par3, double par5)`
`double` | `getRenderDistance()`
`World` | `getWorldObj()`
`void` | `invalidate()` invalidates a tile entity
`boolean` | `isInvalid()` returns true if tile entity is invalid, false otherwise
`void` | `onChunkUnload()` Called when the chunk this TileEntity is on is Unloaded.
`void` | `onDataPacket(NetworkManager net, Packet132TileEntityData pkt)` Called when you receive a TileEntityData packet for the location this TileEntity is currently in.
`void` | `onInventoryChanged()` Called when an the contents of an Inventory change, usually
`void` | `readFromNBT(NBTTagCompound par1NBTTagCompound)` Reads a tile entity from NBT.
`void` | `receiveClientEvent(int par1, int par2)` Called when a client event is received with the event number and argument, see World.sendClientEvent
`void` | `setWorldObj(World par1World)` Sets the worldObj for this tileEntity.
`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
`void` | `updateEntity()` Allows the entity to update its state.
`void` | `validate()` validates a tile entity
`void` | `writeToNBT(NBTTagCompound par1NBTTagCompound)` Writes a tile entity to NBT.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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.

### blockMetadata

    public int blockMetadata

### blockType

    public Block blockType

  the Block type that this TileEntity is contained within

Constructor Detail

### TileEntity

    public TileEntity()

Method Detail

### 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.

### setWorldObj

    public void setWorldObj(World par1World)

  Sets the worldObj for this tileEntity.

### getWorldObj

    public World getWorldObj()

### func_70309_m

    public boolean func_70309_m()

### 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)

### getBlockType

    public Block getBlockType()

### 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 void 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

### canUpdate

    public boolean canUpdate()

  Determines if this TileEntity requires update calls.

  Returns:
    True if you want updateEntity() to be called, false if not

### onDataPacket

    public void onDataPacket(NetworkManager net,
                             Packet132TileEntityData pkt)

  Called when you receive a TileEntityData packet for the location this TileEntity is currently in. On the client, the NetworkManager will always be the remote server. On the server, it will be whomever is responsible for sending the packet.

  Parameters:
    `net` - The NetworkManager the packet originated from
    `pkt` - The data packet

### onChunkUnload

    public void onChunkUnload()

  Called when the chunk this TileEntity is on is Unloaded.

### getRenderDistance

    public double getRenderDistance()

  Returns:
    The maximum distance between the player and the TileEntity at which the TileEntitySpecialRenderer will be called

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD