Package dev.kosmx.playerAnim.core.data
Class KeyframeAnimation
java.lang.Object
dev.kosmx.playerAnim.core.data.KeyframeAnimation
Used to store Emote data
Animation data
Notable key points in time:
begin: probably the first keyframe, before this, the default model can move to starting pose
end: last animation keyframe
stop: animating ends, after end the character can go back to its default pose
isInfinite:
if true, the animation will jump back to returnToTick after endTick inclusive
To play an animation use KeyframeAnimationPlayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AnimationFormatWhere is the animation from, not used in equals or hash.final intstatic final KeyframeAnimation.StateCollection.Statefinal intMutable extra members for extra information storefinal booleanfinal booleanfinal booleanIs the uuid generated when loading or was loaded from a filefinal booleanfinal intfinal int -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanExtraData from source are ignoredget()intWill return invalid information ifisInfiniteis true@NotNull StringgetName()@Nullable KeyframeAnimation.StateCollectioninthashCode()booleanbooleanisPlayingAt(int tick) @NotNull IActualAnimation<KeyframeAnimationPlayer> toString()
-
Field Details
-
EMPTY_STATE
-
beginTick
public final int beginTick -
endTick
public final int endTick -
stopTick
public final int stopTick -
isInfinite
public final boolean isInfinite -
returnToTick
public final int returnToTick -
isEasingBefore
public final boolean isEasingBefore -
nsfw
public final boolean nsfw -
isUUIDGenerated
public final boolean isUUIDGeneratedIs the uuid generated when loading or was loaded from a file -
extraData
Mutable extra members for extra information store -
animationFormat
Where is the animation from, not used in equals or hash.
-
-
Method Details
-
equals
ExtraData from source are ignored -
hashCode
public int hashCode() -
copy
-
mutableCopy
-
isPlayingAt
public boolean isPlayingAt(int tick) -
get
-
getLength
public int getLength()Will return invalid information ifisInfiniteis true- Returns:
- The length of the emote in ticks (20 t/s)
-
isInfinite
public boolean isInfinite() -
getPart
-
getPartOptional
-
playAnimation
- Specified by:
playAnimationin interfaceIPlayable
-
getName
-
toString
-