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
AnimationDefinition
s on reload.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
static final AnimationDefinition
private final ResourceLocation
private static final org.slf4j.Logger
private @Nullable AnimationDefinition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
bind
(AnimationDefinition value) get()
Gets the currently loaded animation.@Nullable AnimationDefinition
Gets the currently loaded animation or null if it has not been loaded.boolean
isBound()
Returns whether the animation has been loaded.key()
Gets the key associated with this animation.(package private) void
unbind()
-
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.
-