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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.animation.AnimationDefinition
    getAnimationDefinition(net.minecraft.resources.ResourceLocation key)
    Gets the AnimationDefinition mapped to a given ResourceLocation key.
    net.minecraft.resources.ResourceLocation
    getKey(net.minecraft.client.animation.AnimationDefinition animationDefinition)
    Gets ResourceLocation key for a given AnimationDefinition.
    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, wait

    Methods 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 the AnimationDefinition mapped to a given ResourceLocation key.
      Parameters:
      key - A ResourceLocation key to use to look up its AnimationDefinition.
      Returns:
      The AnimationDefinition mapped to a given ResourceLocation key, or null if no such mapping exists.
    • getKey

      @Nullable public net.minecraft.resources.ResourceLocation getKey(net.minecraft.client.animation.AnimationDefinition animationDefinition)
      Gets ResourceLocation key for a given AnimationDefinition.
      Parameters:
      animationDefinition - An AnimationDefinition to use to look up its ResourceLocation key.
      Returns:
      The ResourceLocation key for a given AnimationDefinition, 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:
      reload in interface net.minecraft.server.packs.resources.PreparableReloadListener