Class AnimatedBlockDisplay

java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.AnimatedBlockDisplay
All Implemented Interfaces:
IAnimatedBlock, IAnimatedBlockSpigot

public final class AnimatedBlockDisplay extends Object implements IAnimatedBlockSpigot
Represents an animated block display. These are the blocks that the player sees moving around in the world.
  • Method Details

    • 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
    • getTicksLived

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

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

      public void moveToTarget(RotatedPosition target)
      Description copied from interface: IAnimatedBlock
      Moves this animated block to the target.
      Specified by:
      moveToTarget in interface IAnimatedBlock
      Parameters:
      target - The target position the block should move to.
    • isAlive

      public boolean isAlive()
      Specified by:
      isAlive in interface IAnimatedBlock
      Returns:
      True if this animated block is alive.
    • getAnimatedBlockData

      public IAnimatedBlockData getAnimatedBlockData()
      Specified by:
      getAnimatedBlockData in interface IAnimatedBlock
      Returns:
      The block data of this animated block.
    • getMaterial

      public org.bukkit.Material getMaterial()
      Description copied from interface: IAnimatedBlockSpigot
      Gets the material this block is made of.
      Specified by:
      getMaterial in interface IAnimatedBlockSpigot
      Returns:
      The material this block is made of.
    • getEntity

      @Nullable public @Nullable org.bukkit.entity.Entity getEntity()
      Specified by:
      getEntity in interface IAnimatedBlockSpigot
    • getLocation

      public ILocation getLocation()
      Specified by:
      getLocation in 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.

    • getPosition

      public Vector3Dd getPosition()
      Specified by:
      getPosition in 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.

    • getCurrentPosition

      public Vector3Dd getCurrentPosition()
      Specified by:
      getCurrentPosition in interface IAnimatedBlock
      Returns:
      The current position of this animated block. This value is updated after each tick/teleport.
    • 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()
      Specified by:
      getPreviousTarget in interface IAnimatedBlock
      Returns:
      The previous movement target.
    • getFinalPosition

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

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

      public boolean isOnEdge()
    • getStartPosition

      public RotatedPosition getStartPosition()
      Specified by:
      getStartPosition in interface IAnimatedBlock
      Returns:
      The starting position of this animated block.
    • 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.
    • getBukkitWorld

      public org.bukkit.World getBukkitWorld()
      Description copied from interface: IAnimatedBlockSpigot
      Gets the bukkit world this animated block exists in.
      Specified by:
      getBukkitWorld in interface IAnimatedBlockSpigot
      Returns:
      The world this animated block exists in.