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 -
Method Summary
Modifier and TypeMethodDescriptionGets the previous position of this animated block.floatdefault doubledefault doubledefault doubleintgetWorld()Gets the world this animated block exists in.booleanisAlive()voidkill()Removes the entity from the world.voidmoveToTarget(RotatedPosition target) Moves this animated block to the target.voidrespawn()Respawns this animated block.voidspawn()Spawns this animated block.
-
Method Details
-
isAlive
boolean isAlive()- Returns:
- True if this animated block is alive.
-
getAnimatedBlockData
IAnimatedBlockData getAnimatedBlockData()- 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.
-
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()- 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
Moves this animated block to the target.- 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.
-
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.
-
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.
-
getStartPosition
RotatedPosition getStartPosition()- Returns:
- The starting position of this animated block.
-
getFinalPosition
RotatedPosition getFinalPosition()- 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.
-
getStartY
default double getStartY()- 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.
-
getRadius
float getRadius()- Returns:
- The radius this animated block had in relation to the engine when the animation first started.
-