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 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

      @Deprecated(forRemoval=true) @NotNull default @NotNull Vec3f get3DTransform(@NotNull @NotNull String modelName, @NotNull @NotNull TransformType type, float tickDelta, @NotNull @NotNull Vec3f value0)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use get3DTransform(PartKey, TransformType, float, Vec3f) instead. PartKey is supposed to be faster than string comparisons.
      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
    • get3DTransform

      @NotNull default @NotNull Vec3f get3DTransform(@NotNull @NotNull PartKey modelKey, @NotNull @NotNull TransformType type, float tickDelta, @NotNull @NotNull Vec3f value0)
      Get the transformed value to a model part, transform type.

      API note
      DO NOT CALL super.get3DTransform() as the default implementation will be removed.

      Parameters:
      modelKey - 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