Package dev.kosmx.playerAnim.api.layered
Class PlayerAnimationFrame
java.lang.Object
dev.kosmx.playerAnim.api.layered.PlayerAnimationFrame
- All Implemented Interfaces:
IAnimation
Mixin it into a player, add to its Animation stack,
and override its tick,
It is a representation of your pose on the frame.
Override IAnimation.setupAnim(float) and set the pose there.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPartprotected PlayerAnimationFrame.PlayerPart -
Constructor Summary
Constructors -
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.booleanisActive()Is the animation currently active.voidReset every part, those parts won't influence the animation Don't use it if you don't want to set every part in every framevoidtick()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 ACTIVEMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.kosmx.playerAnim.api.layered.IAnimation
getFirstPersonConfiguration, getFirstPersonMode, setupAnim
-
Field Details
-
head
-
body
-
rightArm
-
leftArm
-
rightLeg
-
leftLeg
-
rightItem
-
leftItem
-
-
Constructor Details
-
PlayerAnimationFrame
public PlayerAnimationFrame()
-
-
Method Details
-
tick
public void tick()Description copied from interface:IAnimationAnimation 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:
tickin interfaceIAnimation
-
isActive
public boolean isActive()Description copied from interface:IAnimationIs the animation currently active. Tick will only be invoked when ACTIVE- Specified by:
isActivein interfaceIAnimation- Returns:
- active
-
resetPose
public void resetPose()Reset every part, those parts won't influence the animation Don't use it if you don't want to set every part in every frame -
get3DTransform
@NotNull public @NotNull Vec3f get3DTransform(@NotNull @NotNull String modelName, @NotNull @NotNull TransformType type, float tickDelta, @NotNull @NotNull Vec3f value0) Description copied from interface:IAnimationGet the transformed value to a model part, transform type.- Specified by:
get3DTransformin interfaceIAnimation- 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
-