Class Animation<T extends IAnimatedBlock>
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.animation.Animation<T>
- Type Parameters:
T- The type of the animated block.
Represents an animation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the various stages an animation can be in. -
Method Summary
Modifier and TypeMethodDescriptionThe list of animated blocks that are used in this animation.The type of the animation.intThe number of animation steps that this animation will execute.The region that this animation currently occupies.intThe player responsible for the animation.getState()The current state of the animation.intThe number of animation steps that have been executed so far during this animation.A snapshot of the structure being animated, created before the movement started.The type of the structure being toggled.booleanTrue if the animation is 'perpetual'.
-
Method Details
-
getRemainingSteps
public int getRemainingSteps()- Returns:
- The number of animation steps remaining in this animation. This only includes the steps to be executed by
the animation and not any steps required for the cleanup phase.
When
isPerpetual()is true, this method always returnsgetDuration().
-
getDuration
public int getDuration()The number of animation steps that this animation will execute. This excludes any steps taken during the cleanup phase. -
isPerpetual
public boolean isPerpetual()True if the animation is 'perpetual'.Perpetual animations will continue until aborted externally. This may happen when the area they are animating in is unloaded by the server, when the server/plugin restarts, or when a user stops/deletes the structure.
-
getRegion
The region that this animation currently occupies.It should be noted that this is only a rather inaccurate approximation, as it is a snapshot of the region of a moving object. Additionally, there are further inaccuracies introduced by rounding and region buffering.
-
getAnimatedBlocks
The list of animated blocks that are used in this animation. -
getStructureSnapshot
A snapshot of the structure being animated, created before the movement started. -
getStructureType
The type of the structure being toggled. -
getState
The current state of the animation. -
getStepsExecuted
public int getStepsExecuted()The number of animation steps that have been executed so far during this animation. This excludes any steps taken during the cleanup phase. -
getAnimationType
The type of the animation. -
getResponsible
The player responsible for the animation.This player may be the player who requested the animation, or it may be the prime owner of the structure if the animation request was not made by a player.
This player may not be online.
-