Class SpeedModifier

All Implemented Interfaces:
IAnimation

public class SpeedModifier extends AbstractModifier
Modifies the animation speed. speed = 2 means twice the speed, the animation will take half as long length = 1/speed
  • Field Details

    • speed

      public float speed
  • Constructor Details

    • SpeedModifier

      public SpeedModifier(float speed)
  • Method Details

    • tick

      public void tick()
      Description copied from interface: IAnimation
      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
      Specified by:
      tick in interface IAnimation
      Overrides:
      tick in class AnimationContainer<IAnimation>
    • setupAnim

      public void setupAnim(float tickDelta)
      Description copied from interface: IAnimation
      Called before rendering a character
      Specified by:
      setupAnim in interface IAnimation
      Overrides:
      setupAnim in class AnimationContainer<IAnimation>
      Parameters:
      tickDelta - Time since the last tick. 0-1
    • step

      protected void step(float delta)
    • get3DTransform

      @NotNull public @NotNull Vec3f get3DTransform(@NotNull @NotNull String modelName, @NotNull @NotNull TransformType type, float tickDelta, @NotNull @NotNull Vec3f value0)
      Description copied from interface: IAnimation
      Get the transformed value to a model part, transform type.
      Specified by:
      get3DTransform in interface IAnimation
      Overrides:
      get3DTransform in class AnimationContainer<IAnimation>
      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