Class PistonMovingBlockEntity

All Implemented Interfaces:
ICapabilityProvider, ICapabilityProviderImpl<BlockEntity>, ICapabilitySerializable<CompoundTag>, IForgeBlockEntity, INBTSerializable<CompoundTag>

public class PistonMovingBlockEntity extends BlockEntity
  • Field Details

    • TICKS_TO_EXTEND

      private static final int TICKS_TO_EXTEND
      See Also:
    • PUSH_OFFSET

      private static final double PUSH_OFFSET
      See Also:
    • TICK_MOVEMENT

      public static final double TICK_MOVEMENT
      See Also:
    • 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

    • PistonMovingBlockEntity

      public PistonMovingBlockEntity(BlockPos p_155901_, BlockState p_155902_)
    • PistonMovingBlockEntity

      public PistonMovingBlockEntity(BlockPos p_155904_, BlockState p_155905_, BlockState p_155906_, Direction p_155907_, boolean p_155908_, boolean p_155909_)
  • Method Details

    • getUpdateTag

      public CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class BlockEntity
    • isExtending

      public boolean isExtending()
    • getDirection

      public Direction getDirection()
    • isSourcePiston

      public boolean isSourcePiston()
    • getProgress

      public float getProgress(float p_60351_)
    • getXOff

      public float getXOff(float p_60381_)
    • getYOff

      public float getYOff(float p_60386_)
    • getZOff

      public float getZOff(float p_60389_)
    • getExtendedProgress

      private float getExtendedProgress(float p_60391_)
    • getCollisionRelatedBlockState

      private BlockState getCollisionRelatedBlockState()
    • moveCollidedEntities

      private static void moveCollidedEntities(Level p_155911_, BlockPos p_155912_, float p_155913_, PistonMovingBlockEntity p_155914_)
    • moveEntityByPiston

      private static void moveEntityByPiston(Direction p_60372_, Entity p_60373_, double p_60374_, Direction p_60375_)
    • moveStuckEntities

      private static void moveStuckEntities(Level p_155932_, BlockPos p_155933_, float p_155934_, PistonMovingBlockEntity p_155935_)
    • matchesStickyCritera

      private static boolean matchesStickyCritera(AABB p_60365_, Entity p_60366_)
    • isStickyForEntities

      private boolean isStickyForEntities()
    • getMovementDirection

      public Direction getMovementDirection()
    • getMovement

      private static double getMovement(AABB p_60368_, Direction p_60369_, AABB p_60370_)
    • moveByPositionAndProgress

      private static AABB moveByPositionAndProgress(BlockPos p_155926_, AABB p_155927_, PistonMovingBlockEntity p_155928_)
    • fixEntityWithinPistonBase

      private static void fixEntityWithinPistonBase(BlockPos p_155921_, Entity p_155922_, Direction p_155923_, double p_155924_)
    • getMovedState

      public BlockState getMovedState()
    • finalTick

      public void finalTick()
    • tick

      public static void tick(Level p_155916_, BlockPos p_155917_, BlockState p_155918_, PistonMovingBlockEntity p_155919_)
    • load

      public void load(CompoundTag p_155930_)
      Overrides:
      load in class BlockEntity
    • saveAdditional

      protected void saveAdditional(CompoundTag p_187530_)
      Overrides:
      saveAdditional in class BlockEntity
    • getCollisionShape

      public VoxelShape getCollisionShape(BlockGetter p_60357_, BlockPos p_60358_)
    • getLastTicked

      public long getLastTicked()
    • setLevel

      public void setLevel(Level p_250671_)
      Overrides:
      setLevel in class BlockEntity