Interface IAnimation

All Known Subinterfaces:
IActualAnimation<T>
All Known Implementing Classes:
AbstractFadeModifier, AbstractModifier, AdjustmentModifier, AnimationContainer, AnimationStack, FirstPersonModifier, KeyframeAnimationPlayer, MirrorModifier, ModifierLayer, PlayerAnimationFrame, SpeedModifier

public interface IAnimation
An entry in AnimationStack, used to get the animated parts current transform
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Vec3f
    get3DTransform(@NotNull String modelName, @NotNull TransformType type, float tickDelta, @NotNull Vec3f value0)
    Get the transformed value to a model part, transform type.
    default @NotNull FirstPersonConfiguration
    getFirstPersonConfiguration(float tickDelta)
     
    default @NotNull FirstPersonMode
    getFirstPersonMode(float tickDelta)
    Active animation can request first person render mode.
    boolean
    Is the animation currently active.
    void
    setupAnim(float tickDelta)
    Called before rendering a character
    default void
    Animation tick, on lag free client 20 [tick/sec] You can get the animations time from other places, but it will be invoked when the animation is ACTIVE
  • Method Details

    • tick

      default void tick()
      Animation tick, on lag free client 20 [tick/sec] You can get the animations time from other places, but it will be invoked when the animation is ACTIVE
    • isActive

      boolean isActive()
      Is the animation currently active. Tick will only be invoked when ACTIVE
      Returns:
      active
    • get3DTransform

      @NotNull @NotNull Vec3f get3DTransform(@NotNull @NotNull String modelName, @NotNull @NotNull TransformType type, float tickDelta, @NotNull @NotNull Vec3f value0)
      Get the transformed value to a model part, transform type.
      Parameters:
      modelName - The questionable model part
      type - Transform type
      tickDelta - Time since the last tick. 0-1
      value0 - The value before the transform. For identity transform return with it.
      Returns:
      The new transform value
    • setupAnim

      void setupAnim(float tickDelta)
      Called before rendering a character
      Parameters:
      tickDelta - Time since the last tick. 0-1
    • getFirstPersonMode

      @NotNull default @NotNull FirstPersonMode getFirstPersonMode(float tickDelta)
      Active animation can request first person render mode.
      Parameters:
      tickDelta - current tickDelta
      Returns:
      FirstPersonMode
    • getFirstPersonConfiguration

      @NotNull default @NotNull FirstPersonConfiguration getFirstPersonConfiguration(float tickDelta)
      Parameters:
      tickDelta -
      Returns:
      current first person configuration, only requested when playing this animation