Enum Class BattleAnimationSubject

java.lang.Object
java.lang.Enum<BattleAnimationSubject>
com.pixelmonmod.pixelmon.api.battles.animation.BattleAnimationSubject
All Implemented Interfaces:
Serializable, Comparable<BattleAnimationSubject>, Constable

public enum BattleAnimationSubject extends Enum<BattleAnimationSubject>
Identifies the battle object an animation action should use as its subject.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static BattleAnimationSubject[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BattleAnimationSubject valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • serializedName

      public String serializedName()
      Returns the lowercase serialized name used by codecs and datapacks.
      Returns:
      the serialized subject name
    • pokemon

      @Nullable public PixelmonWrapper pokemon(ActiveBattleAnimation animation)
      Resolves this subject to a Pokemon wrapper from an active animation.
      Parameters:
      animation - the active animation
      Returns:
      the matching Pokemon wrapper, or null for battle-level subjects