Interface IAnimatedBlock

All Known Subinterfaces:
IAnimatedBlockSpigot
All Known Implementing Classes:
AnimatedBlockDisplay, AnimatedHighlightedBlock

public interface IAnimatedBlock
Represents a block that is being animated.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The different modes for teleporting an animated block.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the block data of this animated block.
    Returns the current position of this animated block.
    Returns the position where the block will be placed after the animation finishes.
    Returns the current location of this entity.
    Returns the current position of this entity.
    Gets the previous position of this animated block.
    Gets the previous movement target.
    float
    Returns the radius this animated block had in relation to the engine when the animation first started.
    Returns the starting position of this animated block (when it was first spawned).
    default double
    Returns the x-coordinate of the location the block was first spawned at.
    default double
    Returns the y-coordinate of the location the block was first spawned at.
    default double
    Returns the z-coordinate of the location the block was first spawned at.
    int
    Returns the number of ticks this animated block has existed for.
    Gets the world this animated block exists in.
    boolean
    Returns whether this animated block is alive.
    void
    Removes the entity from the world.
    void
    Moves this animated block to the target.
    void
    Respawns this animated block.
    void
    Spawns this animated block.
  • Method Details

    • isAlive

      boolean isAlive()
      Returns whether this animated block is alive.
      Returns:
      true if this animated block is alive.
    • getAnimatedBlockData

      IAnimatedBlockData getAnimatedBlockData()
      Returns the block data of this animated block.
      Returns:
      The block data of this animated block.
    • getCurrentPosition

      Vector3Dd getCurrentPosition()
      Returns the current position of this animated block.

      This value is updated after each tick/teleport.

      Returns:
      The current position of this animated block.
    • getPreviousPosition

      Vector3Dd getPreviousPosition()
      Gets the previous position of this animated block.

      This value is updated after each tick/teleport and describes the location this animated block was at before it moved.

      Returns:
      The previous position of this animated block.
    • getPreviousTarget

      Vector3Dd getPreviousTarget()
      Gets the previous movement target.

      This value is updated after each tick/teleport and describes the target this animated block was moving towards before it moved.

      Returns:
      The previous movement target.
    • getWorld

      IWorld getWorld()
      Gets the world this animated block exists in.
      Returns:
      The world this animated block exists in.
    • moveToTarget

      void moveToTarget(RotatedPosition target)
      Moves this animated block to the target.

      The movement will be applied during the next tick.

      Parameters:
      target - The target position the block should move to.
    • spawn

      void spawn()
      Spawns this animated block.
    • respawn

      void respawn()
      Respawns this animated block.
    • kill

      void kill()
      Removes the entity from the world.
    • getTicksLived

      int getTicksLived()
      Returns the number of ticks this animated block has existed for.
      Returns:
      The number of ticks this animated block has existed for.
    • getLocation

      ILocation getLocation()
      Returns the current location of this entity.

      Note that this will not reflect the new location after the animated block is teleported until after the next tick.

      Returns:
      The current location of this entity.
    • getPosition

      Vector3Dd getPosition()
      Returns the current position of this entity.

      Note that this will not reflect the new position after the animated block is teleported until after the next tick.

      Returns:
      The current position of this entity.
    • getStartPosition

      RotatedPosition getStartPosition()
      Returns the starting position of this animated block (when it was first spawned).
      Returns:
      The starting position of this animated block.
    • getFinalPosition

      RotatedPosition getFinalPosition()
      Returns the position where the block will be placed after the animation finishes.
      Returns:
      The position where the block will be placed after the animation finishes.
    • getStartX

      default double getStartX()
      Returns the x-coordinate of the location the block was first spawned at.
      Returns:
      The x-coordinate of the location the block was first spawned at.
    • getStartY

      default double getStartY()
      Returns the y-coordinate of the location the block was first spawned at.
      Returns:
      The y-coordinate of the location the block was first spawned at.
    • getStartZ

      default double getStartZ()
      Returns the z-coordinate of the location the block was first spawned at.
      Returns:
      The z-coordinate of the location the block was first spawned at.
    • getRadius

      float getRadius()
      Returns the radius this animated block had in relation to the engine when the animation first started.
      Returns:
      The radius this animated block had in relation to the engine when the animation first started.