Class AnimationLoader
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<ResourceLocation,AnimationDefinition>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<AnimationDefinition>
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 AnimationLoaderprivate static final org.slf4j.Loggerprivate final List<AnimationHolder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(Map<ResourceLocation, AnimationDefinition> animationJsons, ResourceManager resourceManager, ProfilerFiller profiler) @Nullable AnimationDefinitionGets a loadedAnimationDefinitionwith the specifiedkey.Returns anAnimationHolderfor an animation.Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectory, scanDirectory, scanDirectoryWithOptionalValuesMethods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reloadMethods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps, makeConditionalOpsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 loadedAnimationDefinitionwith the specifiedkey. -
getAnimationHolder
Returns anAnimationHolderfor 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, AnimationDefinition> animationJsons, ResourceManager resourceManager, ProfilerFiller profiler) - Specified by:
applyin classSimplePreparableReloadListener<Map<ResourceLocation,AnimationDefinition>>
-