Class BattleAnimationTimeline
java.lang.Object
com.pixelmonmod.pixelmon.api.battles.animation.runtime.BattleAnimationTimeline
- All Implemented Interfaces:
ActiveBattleAnimation,ContextHolder
Runtime animation that schedules and coordinates multiple animation actions.
-
Constructor Summary
ConstructorsConstructorDescriptionBattleAnimationTimeline(BattleAnimationContext context, BattleAnimation animation) BattleAnimationTimeline(BattleAnimationContext animationContext, BattleAnimationAudience audience, Map<String, Integer> markers, List<ScheduledBattleAnimationAction> schedule, UUID groupId) -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeClient(UUID playerId, UUID acknowledgementId) Records a client acknowledgement for this animation.attack()Returns the attack associated with this animation.audience()Returns the audience scope for this animation.booleanReturns whether battle flow should wait for this animation.voidcleanUp()Cleans up state owned by this animation.voidcleanUpChannel(String channel) Cleans up queued or active work in a specific animation channel.Returns the battle controller this animation is attached to.copy(BattleController newController) Creates a copy of this animation attached to another battle controller.booleanisChannelBusy(String channel) Checks whether an animation channel is currently busy.booleanChecks whether the entities used by this animation are still present.booleanReturns whether this animation has finished.target()Returns the Pokemon targeted by the animated action.voidtick()Advances this animation by one battle tick.intticks()Returns the number of 20 TPS animation ticks this animation has been active.user()Returns the Pokemon using the animated action.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.api.battles.animation.runtime.ActiveBattleAnimation
getContextMethods inherited from interface com.pixelmonmod.pixelmon.battles.controller.context.ContextHolder
get, getOrDefault, has, remove, set, update
-
Constructor Details
-
BattleAnimationTimeline
-
BattleAnimationTimeline
public BattleAnimationTimeline(BattleAnimationContext animationContext, BattleAnimationAudience audience, Map<String, Integer> markers, List<ScheduledBattleAnimationAction> schedule, UUID groupId)
-
-
Method Details
-
controller
Description copied from interface:ActiveBattleAnimationReturns the battle controller this animation is attached to.- Specified by:
controllerin interfaceActiveBattleAnimation- Returns:
- the owning battle controller
-
user
Description copied from interface:ActiveBattleAnimationReturns the Pokemon using the animated action.- Specified by:
userin interfaceActiveBattleAnimation- Returns:
- the user Pokemon, or
nullwhen not applicable
-
target
Description copied from interface:ActiveBattleAnimationReturns the Pokemon targeted by the animated action.- Specified by:
targetin interfaceActiveBattleAnimation- Returns:
- the target Pokemon, or
nullwhen not applicable
-
attack
Description copied from interface:ActiveBattleAnimationReturns the attack associated with this animation.- Specified by:
attackin interfaceActiveBattleAnimation- Returns:
- the attack, or
nullwhen not applicable
-
audience
Description copied from interface:ActiveBattleAnimationReturns the audience scope for this animation.- Specified by:
audiencein interfaceActiveBattleAnimation- Returns:
- the animation audience
-
ticks
public int ticks()Description copied from interface:ActiveBattleAnimationReturns the number of 20 TPS animation ticks this animation has been active.- Specified by:
ticksin interfaceActiveBattleAnimation- Returns:
- the active animation tick count
-
copy
Description copied from interface:ActiveBattleAnimationCreates a copy of this animation attached to another battle controller.- Specified by:
copyin interfaceActiveBattleAnimation- Parameters:
newController- the replacement battle controller- Returns:
- the copied animation
-
tick
public void tick()Description copied from interface:ActiveBattleAnimationAdvances this animation by one battle tick.- Specified by:
tickin interfaceActiveBattleAnimation
-
isChannelBusy
Description copied from interface:ActiveBattleAnimationChecks whether an animation channel is currently busy.- Specified by:
isChannelBusyin interfaceActiveBattleAnimation- Parameters:
channel- the channel to check- Returns:
truewhen the channel is busy
-
cleanUpChannel
Description copied from interface:ActiveBattleAnimationCleans up queued or active work in a specific animation channel.- Specified by:
cleanUpChannelin interfaceActiveBattleAnimation- Parameters:
channel- the channel to clean up
-
isFinished
public boolean isFinished()Description copied from interface:ActiveBattleAnimationReturns whether this animation has finished.- Specified by:
isFinishedin interfaceActiveBattleAnimation- Returns:
truewhen the animation is finished
-
isContextAlive
public boolean isContextAlive()Description copied from interface:ActiveBattleAnimationChecks whether the entities used by this animation are still present.- Specified by:
isContextAlivein interfaceActiveBattleAnimation- Returns:
truewhen the animation context is still valid
-
cleanUp
public void cleanUp()Description copied from interface:ActiveBattleAnimationCleans up state owned by this animation.- Specified by:
cleanUpin interfaceActiveBattleAnimation
-
blocksBattle
public boolean blocksBattle()Description copied from interface:ActiveBattleAnimationReturns whether battle flow should wait for this animation.- Specified by:
blocksBattlein interfaceActiveBattleAnimation- Returns:
truewhen this animation blocks battle progression
-
acknowledgeClient
Description copied from interface:ActiveBattleAnimationRecords a client acknowledgement for this animation.- Specified by:
acknowledgeClientin interfaceActiveBattleAnimation- Parameters:
playerId- the acknowledging playeracknowledgementId- the acknowledgement id
-