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

public class ClientBattleAnimationInstance extends BattleAnimationInstance
Server-side active animation instance for effects that are owned by the client renderer.
  • Constructor Details

  • Method Details

    • animationId

      public UUID 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:
      true once playback has been started on clients
    • channel

      public void channel(String channel)
      Sets the scheduling channel for this client animation.
      Parameters:
      channel - the scheduling channel
    • groupId

      public void groupId(UUID 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: ActiveBattleAnimation
      Cleans up state owned by this animation.
      Specified by:
      cleanUp in interface ActiveBattleAnimation
      Overrides:
      cleanUp in class BattleAnimationInstance
    • isContextAlive

      public boolean isContextAlive()
      Description copied from interface: ActiveBattleAnimation
      Checks whether the entities used by this animation are still present.
      Returns:
      true when the animation context is still valid