Package net.minecraft.src
Class TileEntityPiston
java.lang.Object
net.minecraft.src.TileEntity
net.minecraft.src.TileEntityPiston
-
Field Summary
FieldsFields inherited from class net.minecraft.src.TileEntity
blockMetadata, blockType, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord -
Constructor Summary
ConstructorsConstructorDescriptionTileEntityPiston(int par1, int par2, int par3, boolean par4, boolean par5) TileEntityPiston(int iBlockID, int iMetadata, int iFacing, boolean bExtending, boolean bShouldHeadBeRendered, boolean bShoveledBlock) -
Method Summary
Modifier and TypeMethodDescriptionvoidremoves a pistons tile entity (and if the piston is moving, stops it)intReturns block data at the location of this entity (client-only).static intintfloatfloatgetOffsetX(float par1) floatgetOffsetY(float par1) floatgetOffsetZ(float par1) intReturns the orientation of the piston as an intfloatgetProgress(float par1) Get interpolated progress value (between lastProgress and progress) given the fractional time between ticks as an argument.intbooleanReturns true if a piston is extendingbooleanvoidvoidreadFromNBT(NBTTagCompound par1NBTTagCompound) Reads a tile entity from NBT.protected voidremoveEntityFromPiston(Entity entity, AxisAlignedBB entityBox, int direction, double progressOffset) voidbooleanvoidvoidstoreTileEntity(NBTTagCompound tileEntityData) voidAllows the entity to update its state.voidwriteToNBT(NBTTagCompound par1NBTTagCompound) Writes a tile entity to NBT.Methods inherited from class net.minecraft.src.TileEntity
addMapping, createAndLoadEntity, func_85027_a, getBlockType, getDescriptionPacket, getDistanceFrom, getMaxRenderDistanceSquared, getWorldObj, hasWorldObj, invalidate, isInvalid, onInventoryChanged, receiveClientEvent, setWorldObj, updateContainingBlockInfo, validate
-
Field Details
-
storedTileEntityData
-
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
-
storeCachedTileEntity
public void storeCachedTileEntity() -
getStoredBlockID
public int getStoredBlockID() -
getBlockMetadata
public int getBlockMetadata()Returns block data at the location of this entity (client-only).- Overrides:
getBlockMetadatain classTileEntity
-
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:
updateEntityin classTileEntity
-
restoreStoredBlock
public void restoreStoredBlock() -
readFromNBT
Reads a tile entity from NBT.- Overrides:
readFromNBTin classTileEntity
-
writeToNBT
Writes a tile entity to NBT.- Overrides:
writeToNBTin classTileEntity
-
getDirectionMoving
public int getDirectionMoving()
-