Class BattleAnimationDebug

java.lang.Object
com.pixelmonmod.pixelmon.api.battles.animation.BattleAnimationDebug

public final class BattleAnimationDebug extends Object
Utility methods for optional battle animation debug logging.
  • Field Details

    • BATTLE_ANIMATION_DEBUG

      public static final boolean BATTLE_ANIMATION_DEBUG
    • LOGGER

      public static final org.slf4j.Logger LOGGER
  • Method Details

    • enabled

      public static boolean enabled()
      Returns whether battle animation debug logging is enabled.
      Returns:
      true when debug logging is enabled
    • isBattleUiChannel

      public static boolean isBattleUiChannel(String channel)
      Checks whether a channel name targets battle UI animation state.
      Parameters:
      channel - the animation channel
      Returns:
      true for the battle UI channel or one of its scoped children
    • log

      public static void log(String message, Object... args)
      Logs a debug message when debug logging is enabled.
      Parameters:
      message - the SLF4J message pattern
      args - the message arguments
    • actionName

      public static String actionName(BattleAnimationAction action)
      Returns a readable action name for debug output.
      Parameters:
      action - the animation action
      Returns:
      the action's simple class name, or "null"
    • shortId

      public static String shortId(UUID id)
      Shortens a UUID for compact debug output.
      Parameters:
      id - the UUID to shorten
      Returns:
      the first eight UUID characters, or "-" when absent
    • shortId

      public static String shortId(Optional<UUID> id)
      Shortens an optional UUID for compact debug output.
      Parameters:
      id - the optional UUID to shorten
      Returns:
      the first eight UUID characters, or "-" when absent
    • shortIds

      public static String shortIds(Collection<UUID> ids)
      Shortens a collection of UUIDs for compact debug output.
      Parameters:
      ids - the UUIDs to shorten
      Returns:
      a comma-separated list of shortened UUIDs