Class AnimationLoader
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
net.neoforged.neoforge.client.entity.animation.json.AnimationLoader
- All Implemented Interfaces:
PreparableReloadListener
A loader for entity animations written in JSON. You can also get parsed animations from this class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<ResourceLocation, AnimationHolder> static final AnimationLoader
private static final org.slf4j.Logger
private final List
<AnimationHolder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(Map<ResourceLocation, com.google.gson.JsonElement> animationJsons, ResourceManager resourceManager, ProfilerFiller profiler) @Nullable AnimationDefinition
Gets a loadedAnimationDefinition
with the specifiedkey
.Returns anAnimationHolder
for an animation.Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectory
Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
INSTANCE
-
animations
-
strongHolderReferences
-
-
Constructor Details
-
AnimationLoader
private AnimationLoader()
-
-
Method Details
-
getAnimation
Gets a loadedAnimationDefinition
with the specifiedkey
. -
getAnimationHolder
Returns anAnimationHolder
for an animation. If the specified animation has not been loaded, the holder will be unbound, but may be bound in the future. -
apply
protected void apply(Map<ResourceLocation, com.google.gson.JsonElement> animationJsons, ResourceManager resourceManager, ProfilerFiller profiler) - Specified by:
apply
in classSimplePreparableReloadListener<Map<ResourceLocation,
com.google.gson.JsonElement>>
-