Class ClientBattleAnimationInstance
java.lang.Object
com.pixelmonmod.pixelmon.api.battles.animation.runtime.BattleAnimationInstance
com.pixelmonmod.pixelmon.api.battles.animation.client.ClientBattleAnimationInstance
- All Implemented Interfaces:
ActiveBattleAnimation,ContextHolder
Server-side active animation instance for effects that are owned by the client renderer.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.battles.animation.runtime.BattleAnimationInstance
action, attack, controller, target, ticks, user -
Constructor Summary
ConstructorsConstructorDescriptionClientBattleAnimationInstance(BattleAnimationAction action, BattleAnimationContext context) -
Method Summary
Modifier and TypeMethodDescriptionReturns the unique id used to pair start and stop packets for this client animation.voidSets the scheduling channel for this client animation.voidcleanUp()Cleans up state owned by this animation.voidSets the timeline group id shared by related client animations.booleanChecks whether the entities used by this animation are still present.voidStarts this animation on relevant clients if it has not already started.booleanstarted()Returns whether the start packet has already been sent.Methods inherited from class com.pixelmonmod.pixelmon.api.battles.animation.runtime.BattleAnimationInstance
action, advanceAnimationTicks, attack, controller, copy, isFinished, target, tick, ticks, userMethods 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
acknowledgeClient, audience, blocksBattle, cleanUpChannel, getContext, isChannelBusyMethods inherited from interface com.pixelmonmod.pixelmon.battles.controller.context.ContextHolder
get, getOrDefault, has, remove, set, update
-
Constructor Details
-
ClientBattleAnimationInstance
-
-
Method Details
-
animationId
Returns the unique id used to pair start and stop packets for this client animation.- Returns:
- the client animation id
-
started
public boolean started()Returns whether the start packet has already been sent.- Returns:
trueonce playback has been started on clients
-
channel
Sets the scheduling channel for this client animation.- Parameters:
channel- the scheduling channel
-
groupId
Sets the timeline group id shared by related client animations.- Parameters:
groupId- the timeline group id
-
playOnClients
public void playOnClients()Starts this animation on relevant clients if it has not already started. -
cleanUp
public void cleanUp()Description copied from interface:ActiveBattleAnimationCleans up state owned by this animation.- Specified by:
cleanUpin interfaceActiveBattleAnimation- Overrides:
cleanUpin classBattleAnimationInstance
-
isContextAlive
public boolean isContextAlive()Description copied from interface:ActiveBattleAnimationChecks whether the entities used by this animation are still present.- Returns:
truewhen the animation context is still valid
-