All Known Implementing Classes:
AnchorAnimationTransform, AttachedAnimationTransform, BetweenAnimationTransform, MoveBetweenAnimationTransform, OrbitAnimationTransform

public interface AnimationTransform
Defines how an active attack animation is positioned and updated in the world.

An AnimationTransform is responsible for applying per-tick spatial behaviour to an ActiveBattleAnimation. Implementations may anchor an animation to a battle target, move it between two positions, stretch it between the user and target, orbit it around an entity, or perform any other transform-specific positioning logic.

Transforms are data-driven and dispatched through the animation transform registry using AnimationTransformType. Each implementation provides its registered type via type(), allowing CODEC to decode the correct transform from animation data.

A transform usually mutates the entity state stored in the supplied ActiveBattleAnimation, such as a modelled animation entity in the animation context.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<AnimationTransform>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Updates this transform for one animation tick.
    Gets the registered transform type for this implementation.
  • Field Details

  • Method Details

    • type

      Gets the registered transform type for this implementation.

      This is used by CODEC to dispatch to the correct implementation-specific codec when decoding data-driven animation definitions.

      Returns:
      the registered animation transform type
    • tick

      void tick(ActiveBattleAnimation animation)
      Updates this transform for one animation tick.

      Implementations should use this method to update the active animation's position, rotation, scale, or any other transform-related state.

      Parameters:
      animation - the active battle animation being transformed