Class AnimationTypeManager
java.lang.Object
net.neoforged.neoforge.client.entity.animation.json.AnimationTypeManager
Manager for custom
AnimationTargets and interpolation functions.
The built-in AnimationTargets are: minecraft:position, minecraft:rotation, and
minecraft:scale.
The built-in interpolation functions are minecraft:linear and
minecraft:catmullrom.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ImmutableBiMap<ResourceLocation, AnimationChannel.Interpolation> private static final ImmutableBiMap<ResourceLocation, AnimationTarget> private static Stringprivate static ImmutableBiMap<ResourceLocation, AnimationChannel.Interpolation> private static ImmutableMap<AnimationTarget, com.mojang.serialization.Codec<Keyframe>> private static Stringprivate static ImmutableBiMap<ResourceLocation, AnimationTarget> private static ImmutableMap<AnimationChannel.Target, AnimationTarget> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theinterpolation functionassociated with the givenname.static StringRetrieves a comma-separated list of all availableinterpolation functions, for use in error messages.static @Nullable ResourceLocationgetInterpolationName(AnimationChannel.Interpolation interpolation) Gets theResourceLocationassociated with the giveninterpolation.static @Nullable com.mojang.serialization.Codec<Keyframe> getKeyframeCodec(AnimationTarget target) static @Nullable AnimationTargetgetTarget(ResourceLocation name) Gets theAnimationTargetassociated with the givenname.static @Nullable AnimationTargetGets the fullAnimationTargetfrom itschannelTarget.static StringRetrieves a comma-separated list of all availableAnimationTargets, for use in error messages.static @Nullable ResourceLocationgetTargetName(AnimationTarget target) Gets theResourceLocationassociated with the giventarget.static voidinit()private static void
-
Field Details
-
DEFAULT_TARGETS
-
DEFAULT_INTERPOLATIONS
private static final ImmutableBiMap<ResourceLocation,AnimationChannel.Interpolation> DEFAULT_INTERPOLATIONS -
TARGETS
-
TARGETS_BY_CHANNEL_TARGET
-
KEYFRAME_CODECS
private static ImmutableMap<AnimationTarget,com.mojang.serialization.Codec<Keyframe>> KEYFRAME_CODECS -
INTERPOLATIONS
-
TARGET_LIST
-
INTERPOLATION_LIST
-
-
Constructor Details
-
AnimationTypeManager
private AnimationTypeManager()
-
-
Method Details
-
getTarget
Gets theAnimationTargetassociated with the givenname. -
getTargetName
Gets theResourceLocationassociated with the giventarget. -
getTargetFromChannelTarget
@Nullable public static @Nullable AnimationTarget getTargetFromChannelTarget(AnimationChannel.Target target) Gets the fullAnimationTargetfrom itschannelTarget. -
getKeyframeCodec
@Nullable public static @Nullable com.mojang.serialization.Codec<Keyframe> getKeyframeCodec(AnimationTarget target) -
getInterpolation
Gets theinterpolation functionassociated with the givenname. -
getInterpolationName
@Nullable public static @Nullable ResourceLocation getInterpolationName(AnimationChannel.Interpolation interpolation) Gets theResourceLocationassociated with the giveninterpolation. -
getTargetList
Retrieves a comma-separated list of all availableAnimationTargets, for use in error messages. -
getInterpolationList
Retrieves a comma-separated list of all availableinterpolation functions, for use in error messages. -
init
@Internal public static void init() -
recomputeDerivedFields
private static void recomputeDerivedFields()
-