Package dev.kosmx.playerAnim.api.layered
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 TypeMethodDescription@NotNull Vec3fget3DTransform(@NotNull String modelName, @NotNull TransformType type, float tickDelta, @NotNull Vec3f value0) Get the transformed value to a model part, transform type.default @NotNull FirstPersonConfigurationgetFirstPersonConfiguration(float tickDelta) default @NotNull FirstPersonModegetFirstPersonMode(float tickDelta) Active animation can request first person render mode.booleanisActive()Is the animation currently active.voidsetupAnim(float tickDelta) Called before rendering a characterdefault voidtick()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 parttype- Transform typetickDelta- Time since the last tick. 0-1value0- 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
Active animation can request first person render mode.- Parameters:
tickDelta- current tickDelta- Returns:
FirstPersonMode
-
getFirstPersonConfiguration
- Parameters:
tickDelta-- Returns:
- current first person configuration, only requested when playing this animation
-