public class TileEntityPiston extends TileEntity implements ITickable
Modifier and Type | Field and Description |
---|---|
private boolean |
extending
if this piston is extending or not
|
private java.util.List<Entity> |
field_174933_k |
private float |
lastProgress
the progress in (de)extending
|
private EnumFacing |
pistonFacing |
private IBlockState |
pistonState |
private float |
progress |
private boolean |
shouldHeadBeRendered |
blockType, pos, tileEntityInvalid, worldObj
Constructor and Description |
---|
TileEntityPiston() |
TileEntityPiston(IBlockState pistonStateIn,
EnumFacing pistonFacingIn,
boolean extendingIn,
boolean shouldHeadBeRenderedIn) |
Modifier and Type | Method and Description |
---|---|
void |
clearPistonTileEntity()
removes a piston's tile entity (and if the piston is moving, stops it)
|
int |
getBlockMetadata() |
EnumFacing |
getFacing() |
float |
getOffsetX(float ticks) |
float |
getOffsetY(float ticks) |
float |
getOffsetZ(float ticks) |
IBlockState |
getPistonState() |
float |
getProgress(float ticks)
Get interpolated progress value (between lastProgress and progress) given the fractional time between ticks as an
argument
|
boolean |
isExtending()
Returns true if a piston is extending
|
private void |
launchWithSlimeBlock(float p_145863_1_,
float p_145863_2_) |
void |
readFromNBT(NBTTagCompound compound) |
boolean |
shouldPistonHeadBeRendered() |
void |
update()
Like the old updateEntity(), except more generic.
|
void |
writeToNBT(NBTTagCompound compound) |
addInfoToCrashReport, createAndLoadEntity, func_183000_F, getBlockType, getDescriptionPacket, getDistanceSq, getMaxRenderDistanceSquared, getPos, getWorld, hasWorldObj, invalidate, isInvalid, markDirty, receiveClientEvent, setPos, setWorldObj, updateContainingBlockInfo, validate
private IBlockState pistonState
private EnumFacing pistonFacing
private boolean extending
private boolean shouldHeadBeRendered
private float progress
private float lastProgress
private java.util.List<Entity> field_174933_k
public TileEntityPiston()
public TileEntityPiston(IBlockState pistonStateIn, EnumFacing pistonFacingIn, boolean extendingIn, boolean shouldHeadBeRenderedIn)
public IBlockState getPistonState()
public int getBlockMetadata()
getBlockMetadata
in class TileEntity
public boolean isExtending()
public EnumFacing getFacing()
public boolean shouldPistonHeadBeRendered()
public float getProgress(float ticks)
public float getOffsetX(float ticks)
public float getOffsetY(float ticks)
public float getOffsetZ(float ticks)
private void launchWithSlimeBlock(float p_145863_1_, float p_145863_2_)
public void clearPistonTileEntity()
public void update()
public void readFromNBT(NBTTagCompound compound)
readFromNBT
in class TileEntity
public void writeToNBT(NBTTagCompound compound)
writeToNBT
in class TileEntity