Class DelayedActiveBattleAnimation
java.lang.Object
com.pixelmonmod.pixelmon.api.battles.animation.runtime.DelayedActiveBattleAnimation
- All Implemented Interfaces:
ActiveBattleAnimation,ContextHolder
Runtime wrapper that delays ticking another animation for a fixed number of ticks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeClient(UUID playerId, UUID acknowledgementId) Records a client acknowledgement for this animation.attack()Returns the attack associated with this animation.booleanReturns whether battle flow should wait for this animation.voidcleanUp()Cleans up state owned by this animation.Returns the battle controller this animation is attached to.copy(BattleController newController) Creates a copy of this animation attached to another battle controller.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
audience, cleanUpChannel, isChannelBusyMethods inherited from interface com.pixelmonmod.pixelmon.battles.controller.context.ContextHolder
get, getOrDefault, has, remove, set, update
-
Constructor Details
-
DelayedActiveBattleAnimation
-
-
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
-
getContext
- Specified by:
getContextin interfaceActiveBattleAnimation- Specified by:
getContextin interfaceContextHolder
-
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
-
tick
public void tick()Description copied from interface:ActiveBattleAnimationAdvances this animation by one battle tick.- Specified by:
tickin interfaceActiveBattleAnimation
-
isFinished
public boolean isFinished()Description copied from interface:ActiveBattleAnimationReturns whether this animation has finished.- Specified by:
isFinishedin interfaceActiveBattleAnimation- Returns:
truewhen the animation is finished
-
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
-
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
-
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
-