Class AnimatedHighlightedBlock

java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.animatedblock.AnimatedHighlightedBlock
All Implemented Interfaces:
IAnimatedBlock

public class AnimatedHighlightedBlock extends Object implements IAnimatedBlock
An IAnimatedBlock that represents a highlighted block. This block can be used to highlight a block in the world for a player. Usage of this block will not result in any changes to the world.
  • Constructor Details

  • Method Details

    • isAlive

      public boolean isAlive()
      Description copied from interface: IAnimatedBlock
      Returns whether this animated block is alive.
      Specified by:
      isAlive in interface IAnimatedBlock
      Returns:
      true if this animated block is alive.
    • getAnimatedBlockData

      public IAnimatedBlockData getAnimatedBlockData()
      Description copied from interface: IAnimatedBlock
      Returns the block data of this animated block.
      Specified by:
      getAnimatedBlockData in interface IAnimatedBlock
      Returns:
      The block data of this animated block.
    • getCurrentPosition

      public Vector3Dd getCurrentPosition()
      Description copied from interface: IAnimatedBlock
      Returns the current position of this animated block.

      This value is updated after each tick/teleport.

      Specified by:
      getCurrentPosition in interface IAnimatedBlock
      Returns:
      The current position of this animated block.
    • getPreviousPosition

      public Vector3Dd getPreviousPosition()
      Description copied from interface: IAnimatedBlock
      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.

      Specified by:
      getPreviousPosition in interface IAnimatedBlock
      Returns:
      The previous position of this animated block.
    • getPreviousTarget

      public Vector3Dd getPreviousTarget()
      Description copied from interface: IAnimatedBlock
      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.

      Specified by:
      getPreviousTarget in interface IAnimatedBlock
      Returns:
      The previous movement target.
    • getLocation

      public ILocation getLocation()
      Description copied from interface: IAnimatedBlock
      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.

      Specified by:
      getLocation in interface IAnimatedBlock
      Returns:
      The current location of this entity.
    • getPosition

      public Vector3Dd getPosition()
      Description copied from interface: IAnimatedBlock
      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.

      Specified by:
      getPosition in interface IAnimatedBlock
      Returns:
      The current position of this entity.
    • moveToTarget

      public void moveToTarget(RotatedPosition target)
      Description copied from interface: IAnimatedBlock
      Moves this animated block to the target.

      The movement will be applied during the next tick.

      Specified by:
      moveToTarget in interface IAnimatedBlock
      Parameters:
      target - The target position the block should move to.
    • spawn

      public void spawn()
      Description copied from interface: IAnimatedBlock
      Spawns this animated block.
      Specified by:
      spawn in interface IAnimatedBlock
    • kill

      public void kill()
      Description copied from interface: IAnimatedBlock
      Removes the entity from the world.
      Specified by:
      kill in interface IAnimatedBlock
    • respawn

      public void respawn()
      Description copied from interface: IAnimatedBlock
      Respawns this animated block.
      Specified by:
      respawn in interface IAnimatedBlock
    • getTicksLived

      public int getTicksLived()
      Description copied from interface: IAnimatedBlock
      Returns the number of ticks this animated block has existed for.
      Specified by:
      getTicksLived in interface IAnimatedBlock
      Returns:
      The number of ticks this animated block has existed for.
    • getStartPosition

      public RotatedPosition getStartPosition()
      Description copied from interface: IAnimatedBlock
      Returns the starting position of this animated block (when it was first spawned).
      Specified by:
      getStartPosition in interface IAnimatedBlock
      Returns:
      The starting position of this animated block.
    • getFinalPosition

      public RotatedPosition getFinalPosition()
      Description copied from interface: IAnimatedBlock
      Returns the position where the block will be placed after the animation finishes.
      Specified by:
      getFinalPosition in interface IAnimatedBlock
      Returns:
      The position where the block will be placed after the animation finishes.
    • getRadius

      public float getRadius()
      Description copied from interface: IAnimatedBlock
      Returns the radius this animated block had in relation to the engine when the animation first started.
      Specified by:
      getRadius in interface IAnimatedBlock
      Returns:
      The radius this animated block had in relation to the engine when the animation first started.
    • getWorld

      public IWorld getWorld()
      Description copied from interface: IAnimatedBlock
      Gets the world this animated block exists in.
      Specified by:
      getWorld in interface IAnimatedBlock
      Returns:
      The world this animated block exists in.