Class PistonEvent

    • Constructor Detail

      • PistonEvent

        public PistonEvent​(World world,
                           BlockPos pos,
                           Direction direction,
                           PistonEvent.PistonMoveType moveType)
        Parameters:
        world -
        pos - - The position of the piston
        direction - - The direction of the piston
        direction - - The move direction of the piston
    • Method Detail

      • getDirection

        public Direction getDirection()
        Returns:
        The direction of the piston block
      • getFaceOffsetPos

        public BlockPos getFaceOffsetPos()
        Helper method that gets the piston position offset by its facing
      • getPistonMoveType

        public PistonEvent.PistonMoveType getPistonMoveType()
        Returns:
        The movement type of the piston (extension, retraction)
      • getStructureHelper

        @Nullable
        public PistonBlockStructureHelper getStructureHelper()
        Returns:
        A piston structure helper for this movement. Returns null if the world stored is not a World