Class AnimationLoader
java.lang.Object
io.github.vampirestudios.vampirelib.client.AnimationLoader
- All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener
public final class AnimationLoader
extends Object
implements net.minecraft.server.packs.resources.PreparableReloadListener
Handles the data-driven internals for
AnimationDefinition instances.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.animation.AnimationDefinitiongetAnimationDefinition(net.minecraft.resources.ResourceLocation key) Gets theAnimationDefinitionmapped to a givenResourceLocationkey.net.minecraft.resources.ResourceLocationgetKey(net.minecraft.client.animation.AnimationDefinition animationDefinition) GetsResourceLocationkey for a givenAnimationDefinition.reload(net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier barrier, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profilerFiller, net.minecraft.util.profiling.ProfilerFiller profilerFiller2, Executor executor, Executor executor2) Methods 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
-
Constructor Details
-
AnimationLoader
public AnimationLoader()
-
-
Method Details
-
getAnimationDefinition
@Nullable public net.minecraft.client.animation.AnimationDefinition getAnimationDefinition(net.minecraft.resources.ResourceLocation key) Gets theAnimationDefinitionmapped to a givenResourceLocationkey.- Parameters:
key- AResourceLocationkey to use to look up itsAnimationDefinition.- Returns:
- The
AnimationDefinitionmapped to a givenResourceLocationkey, or null if no such mapping exists.
-
getKey
@Nullable public net.minecraft.resources.ResourceLocation getKey(net.minecraft.client.animation.AnimationDefinition animationDefinition) GetsResourceLocationkey for a givenAnimationDefinition.- Parameters:
animationDefinition- AnAnimationDefinitionto use to look up itsResourceLocationkey.- Returns:
- The
ResourceLocationkey for a givenAnimationDefinition, or null if no such key exists.
-
reload
public CompletableFuture<Void> reload(net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier barrier, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profilerFiller, net.minecraft.util.profiling.ProfilerFiller profilerFiller2, Executor executor, Executor executor2) - Specified by:
reloadin interfacenet.minecraft.server.packs.resources.PreparableReloadListener
-