Interface BattleAnimationAction

All Known Subinterfaces:
ClientBackedBattleAnimationAction
All Known Implementing Classes:
AttackBattleAnimationAction, AttackEffectBattleAnimationAction, BattleCameraAnimationAction, BattleExitAnimationAction, BattleParticleAnimationAction, BattleSoundAnimationAction, DelayedBattleAnimationAction, LeapForwardBattleAnimationAction, ModelBattleAnimationAction, MovementBattleAnimationAction, PokemonAnimationAction, PokemonTerastalEffectAnimationAction, PokemonUiCurrentHealthAnimationAction, PokemonUiFaintAnimationAction, PokemonUiHealthAnimationAction, PokemonUiSwitchInAnimationAction, PokemonUiSwitchOutAnimationAction, PokemonVisibilityAnimationAction, RunBattleAnimationAction, SceneBlockAnimationAction, UiVisibilityAnimationAction, VerticalStompBattleAnimationAction

public interface BattleAnimationAction
Strategy for one part of a battle animation.
  • Field Details

  • Method Details

    • codec

      com.mojang.serialization.MapCodec<? extends BattleAnimationAction> codec()
      Returns the codec used to serialize this action.
      Returns:
      this action's map codec
    • type

      Returns the registered action type for this action.
      Returns:
      this action's registered type
    • play

      Creates the runtime animation instance for this action.
      Parameters:
      context - the battle animation context
      Returns:
      the active runtime animation
    • tick

      default void tick(BattleAnimationInstance animation)
      Advances this action by one server tick.
      Parameters:
      animation - the active runtime animation
    • isFinished

      default boolean isFinished(BattleAnimationInstance animation)
      Checks whether this action has completed.
      Parameters:
      animation - the active runtime animation
      Returns:
      true when the action is finished
    • cleanUp

      default void cleanUp(BattleAnimationInstance animation)
      Cleans up any state created while this action was playing.
      Parameters:
      animation - the active runtime animation