Class AnimationHolder
java.lang.Object
net.neoforged.neoforge.client.entity.animation.json.AnimationHolder
Holds a single
AnimationDefinition loaded from resource packs. Objects of this class will be automatically updated with new
AnimationDefinitions on reload.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstatic final AnimationDefinitionprivate final ResourceLocationprivate static final org.slf4j.Loggerprivate @Nullable AnimationDefinition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidbind(AnimationDefinition value) get()Gets the currently loaded animation.@Nullable AnimationDefinitionGets the currently loaded animation or null if it has not been loaded.booleanisBound()Returns whether the animation has been loaded.key()Gets the key associated with this animation.(package private) voidunbind()
-
Field Details
-
EMPTY_ANIMATION
-
LOGGER
private static final org.slf4j.Logger LOGGER -
key
-
value
-
absentWarned
private boolean absentWarned
-
-
Constructor Details
-
AnimationHolder
AnimationHolder(ResourceLocation key)
-
-
Method Details
-
unbind
void unbind() -
bind
-
key
Gets the key associated with this animation. -
get
Gets the currently loaded animation. If the animation has not been loaded, returnsEMPTY_ANIMATION. -
getOrNull
Gets the currently loaded animation or null if it has not been loaded. -
isBound
public boolean isBound()Returns whether the animation has been loaded.
-