Class PistonBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.PistonBlockEntity

public class PistonBlockEntity
extends BlockEntity
A piston block entity represents the block being pushed by a piston.
  • Field Details

    • field_12205

      private static final ThreadLocal<Direction> field_12205
    • pushedBlock

      private BlockState pushedBlock
    • facing

      private Direction facing
    • extending

      private boolean extending
    • source

      private boolean source
    • progress

      private float progress
    • lastProgress

      private float lastProgress
    • savedWorldTime

      private long savedWorldTime
    • field_26705

      private int field_26705
  • Constructor Details

  • Method Details

    • toInitialChunkDataTag

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

      public boolean isExtending()
    • getFacing

      public Direction getFacing()
    • isSource

      public boolean isSource()
    • getProgress

      public float getProgress​(float tickDelta)
    • getRenderOffsetX

      @Environment(CLIENT) public float getRenderOffsetX​(float tickDelta)
    • getRenderOffsetY

      @Environment(CLIENT) public float getRenderOffsetY​(float tickDelta)
    • getRenderOffsetZ

      @Environment(CLIENT) public float getRenderOffsetZ​(float tickDelta)
    • getAmountExtended

      private float getAmountExtended​(float progress)
    • getHeadBlockState

      private BlockState getHeadBlockState()
    • pushEntities

      private static void pushEntities​(World world, BlockPos pos, float float2, PistonBlockEntity blockEntity)
    • method_23672

      private static void method_23672​(Direction direction, Entity entity, double double2, Direction direction2)
    • method_23674

      private static void method_23674​(World world, BlockPos blockPos, float float2, PistonBlockEntity pistonBlockEntity)
    • method_23671

      private static boolean method_23671​(Box box, Entity entity)
    • isPushingHoneyBlock

      private boolean isPushingHoneyBlock()
    • getMovementDirection

      public Direction getMovementDirection()
    • getIntersectionSize

      private static double getIntersectionSize​(Box box, Direction direction, Box box2)
    • offsetHeadBox

      private static Box offsetHeadBox​(BlockPos pos, Box box, PistonBlockEntity blockEntity)
    • push

      private static void push​(BlockPos pos, Entity entity, Direction direction, double amount)
    • getPushedBlock

      public BlockState getPushedBlock()
    • finish

      public void finish()
    • tick

      public static void tick​(World world, BlockPos pos, BlockState state, PistonBlockEntity blockEntity)
    • fromTag

      public void fromTag​(CompoundTag tag)
      Overrides:
      fromTag in class BlockEntity
    • toTag

      public CompoundTag toTag​(CompoundTag tag)
      Overrides:
      toTag in class BlockEntity
    • getCollisionShape

      public VoxelShape getCollisionShape​(BlockView world, BlockPos pos)
    • getSavedWorldTime

      public long getSavedWorldTime()
    • getSquaredRenderDistance

      @Environment(CLIENT) public double getSquaredRenderDistance()
      Overrides:
      getSquaredRenderDistance in class BlockEntity