Class PistonTileEntity

All Implemented Interfaces:
ITickableTileEntity, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeTileEntity, INBTSerializable<CompoundNBT>

public class PistonTileEntity extends TileEntity implements ITickableTileEntity
  • Field Details

    • movedState

      private BlockState movedState
    • direction

      private Direction direction
    • extending

      private boolean extending
    • isSourcePiston

      private boolean isSourcePiston
    • NOCLIP

      private static final ThreadLocal<Direction> NOCLIP
    • progress

      private float progress
    • progressO

      private float progressO
    • lastTicked

      private long lastTicked
    • deathTicks

      private int deathTicks
  • Constructor Details

    • PistonTileEntity

      public PistonTileEntity()
    • PistonTileEntity

      public PistonTileEntity(BlockState p_i45665_1_, Direction p_i45665_2_, boolean p_i45665_3_, boolean p_i45665_4_)
  • Method Details

    • getUpdateTag

      public CompoundNBT getUpdateTag()
      Overrides:
      getUpdateTag in class TileEntity
    • isExtending

      public boolean isExtending()
    • getDirection

      public Direction getDirection()
    • isSourcePiston

      public boolean isSourcePiston()
    • getProgress

      public float getProgress(float p_145860_1_)
    • getXOff

      public float getXOff(float p_174929_1_)
    • getYOff

      public float getYOff(float p_174928_1_)
    • getZOff

      public float getZOff(float p_174926_1_)
    • getExtendedProgress

      private float getExtendedProgress(float p_184320_1_)
    • getCollisionRelatedBlockState

      private BlockState getCollisionRelatedBlockState()
    • moveCollidedEntities

      private void moveCollidedEntities(float p_184322_1_)
    • moveEntityByPiston

      private static void moveEntityByPiston(Direction p_227022_0_, Entity p_227022_1_, double p_227022_2_, Direction p_227022_4_)
    • moveStuckEntities

      private void moveStuckEntities(float p_227024_1_)
    • matchesStickyCritera

      private static boolean matchesStickyCritera(AxisAlignedBB p_227021_0_, Entity p_227021_1_)
    • isStickyForEntities

      private boolean isStickyForEntities()
    • getMovementDirection

      public Direction getMovementDirection()
    • getMovement

      private static double getMovement(AxisAlignedBB p_190612_0_, Direction p_190612_1_, AxisAlignedBB p_190612_2_)
    • moveByPositionAndProgress

      private AxisAlignedBB moveByPositionAndProgress(AxisAlignedBB p_190607_1_)
    • fixEntityWithinPistonBase

      private void fixEntityWithinPistonBase(Entity p_190605_1_, Direction p_190605_2_, double p_190605_3_)
    • getMovedState

      public BlockState getMovedState()
    • finalTick

      public void finalTick()
    • tick

      public void tick()
      Specified by:
      tick in interface ITickableTileEntity
    • load

      public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
      Overrides:
      load in class TileEntity
    • save

      public CompoundNBT save(CompoundNBT p_189515_1_)
      Overrides:
      save in class TileEntity
    • getCollisionShape

      public VoxelShape getCollisionShape(IBlockReader p_195508_1_, BlockPos p_195508_2_)
    • getLastTicked

      public long getLastTicked()
    • getViewDistance

      public double getViewDistance()
      Overrides:
      getViewDistance in class TileEntity