net.minecraft.tileentity

## Class TileEntityPiston

- java.lang.Object
- - net.minecraft.tileentity.TileEntity
  - - net.minecraft.tileentity.TileEntityPiston

-     public class TileEntityPiston
      extends TileEntity

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.tileentity.TileEntity

      `blockMetadata, blockType, INFINITE_EXTENT_AABB, worldObj, xCoord, yCoord, zCoord`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TileEntityPiston()`
    `TileEntityPiston(int par1, int par2, int par3, boolean par4, boolean par5)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearPistonTileEntity()` removes a pistons tile entity (and if the piston is moving, stops it)
    `int` | `getBlockMetadata()` Returns block data at the location of this entity (client-only).
    `float` | `getOffsetX(float par1)`
    `float` | `getOffsetY(float par1)`
    `float` | `getOffsetZ(float par1)`
    `int` | `getPistonOrientation()` Returns the orientation of the piston as an int
    `float` | `getProgress(float par1)` Get interpolated progress value (between lastProgress and progress) given the fractional time between ticks as an argument.
    `int` | `getStoredBlockID()`
    `boolean` | `isExtending()` Returns true if a piston is extending
    `void` | `readFromNBT(NBTTagCompound par1NBTTagCompound)` Reads a tile entity from NBT.
    `boolean` | `shouldRenderHead()`
    `void` | `updateEntity()` Allows the entity to update its state.
    `void` | `writeToNBT(NBTTagCompound par1NBTTagCompound)` Writes a tile entity to NBT.

    - ### Methods inherited from class net.minecraft.tileentity.TileEntity

      `addMapping, canUpdate, createAndLoadEntity, func_70309_m, func_82115_m, func_85027_a, getBlockType, getDescriptionPacket, getDistanceFrom, getRenderBoundingBox, getWorldObj, invalidate, isInvalid, onChunkUnload, onDataPacket, onInventoryChanged, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validate`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TileEntityPiston

          public TileEntityPiston()

    - #### TileEntityPiston

          public TileEntityPiston(int par1,
                          int par2,
                          int par3,
                          boolean par4,
                          boolean par5)

  - ### Method Detail

    - #### getStoredBlockID

          public int getStoredBlockID()

    - #### getBlockMetadata

          public int getBlockMetadata()

      Returns block data at the location of this entity (client-only).
      Overrides:
        `getBlockMetadata` in class `TileEntity`

    - #### isExtending

          public boolean isExtending()

      Returns true if a piston is extending

    - #### getPistonOrientation

          public int getPistonOrientation()

      Returns the orientation of the piston as an int

    - #### shouldRenderHead

          public boolean shouldRenderHead()

    - #### getProgress

          public float getProgress(float par1)

      Get interpolated progress value (between lastProgress and progress) given the fractional time between ticks as an argument.

    - #### getOffsetX

          public float getOffsetX(float par1)

    - #### getOffsetY

          public float getOffsetY(float par1)

    - #### getOffsetZ

          public float getOffsetZ(float par1)

    - #### clearPistonTileEntity

          public void clearPistonTileEntity()

      removes a pistons tile entity (and if the piston is moving, stops it)

    - #### 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.
      Overrides:
        `updateEntity` in class `TileEntity`

    - #### readFromNBT

          public void readFromNBT(NBTTagCompound par1NBTTagCompound)

      Reads a tile entity from NBT.
      Overrides:
        `readFromNBT` in class `TileEntity`

    - #### writeToNBT

          public void writeToNBT(NBTTagCompound par1NBTTagCompound)

      Writes a tile entity to NBT.
      Overrides:
        `writeToNBT` in class `TileEntity`