Class TileEntityPiston

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

public class TileEntityPiston extends TileEntity
  • Field Details

    • storedTileEntityData

      public NBTTagCompound storedTileEntityData
    • cachedTileEntity

      public TileEntity cachedTileEntity
  • Constructor Details

    • TileEntityPiston

      public TileEntityPiston(int iBlockID, int iMetadata, int iFacing, boolean bExtending, boolean bShouldHeadBeRendered, boolean bShoveledBlock)
    • TileEntityPiston

      public TileEntityPiston()
    • TileEntityPiston

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

    • getCollisionIgnoreDirection

      public static int getCollisionIgnoreDirection()
    • storeTileEntity

      public void storeTileEntity(NBTTagCompound tileEntityData)
    • storeCachedTileEntity

      public void storeCachedTileEntity()
    • 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()
    • isRetractingBase

      public boolean isRetractingBase()
    • getProgress

      public float getProgress(float par1)
      Get interpolated progress value (between lastProgress and progress) given the fractional time between ticks as an argument.
    • getExtensionRatio

      public float getExtensionRatio()
    • getOffsetX

      public float getOffsetX(float par1)
    • getOffsetY

      public float getOffsetY(float par1)
    • getOffsetZ

      public float getOffsetZ(float par1)
    • removeEntityFromPiston

      protected void removeEntityFromPiston(Entity entity, AxisAlignedBB entityBox, int direction, double progressOffset)
    • placeBlock

      public void placeBlock()
    • 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
    • restoreStoredBlock

      public void restoreStoredBlock()
    • 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
    • getDirectionMoving

      public int getDirectionMoving()