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()@NotNull Map<String, KeyframeAnimation.StateCollection> The old string to part map getter, it may be the only method that does not get removed after the PartKey refactor.intWill return invalid information ifisInfiniteis true@NotNull StringgetName()@Nullable KeyframeAnimation.StateCollection@Nullable KeyframeAnimation.StateCollectionDeprecated.@NotNull Optional<KeyframeAnimation.StateCollection> getPartOptional(@NotNull PartKey id) @NotNull Optional<KeyframeAnimation.StateCollection> getPartOptional(@NotNull String id) Deprecated.usegetPartOptional(PartKey)instead.inthashCode()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
Deprecated.usegetPart(PartKey)instead. that is faster if you know the key. (PartKey.HEAD) for example- Parameters:
partID- part ID string
-
getPart
@Nullable public @Nullable KeyframeAnimation.StateCollection getPart(@NotNull @NotNull PartKey partID) -
getPartOptional
@NotNull public @NotNull Optional<KeyframeAnimation.StateCollection> getPartOptional(@NotNull @NotNull String id) Deprecated.usegetPartOptional(PartKey)instead. that is faster if you know the key.- Parameters:
id- part ID string
-
getPartOptional
@NotNull public @NotNull Optional<KeyframeAnimation.StateCollection> getPartOptional(@NotNull @NotNull PartKey id) -
playAnimation
- Specified by:
playAnimationin interfaceIPlayable
-
getName
-
getBodyParts
The old string to part map getter, it may be the only method that does not get removed after the PartKey refactor. It is still used by network an many other tools.- Returns:
- Parts in string to part map
-
toString
-
getPart(PartKey)instead.