Class AnimationUtils

java.lang.Object
com.hypixel.hytale.server.core.entity.AnimationUtils

public class AnimationUtils extends Object
A utility class that contains utility functions for animations.
  • Constructor Details

    • AnimationUtils

      public AnimationUtils()
  • Method Details

    • playAnimation

      public static void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nullable String animationId, boolean sendToSelf, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to play a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to play the animation on.
      animationId - The ID of the animation to play.
      sendToSelf - Whether to send the animation packet to the entity itself.
      componentAccessor - The ComponentAccessor for component access.
    • playAnimation

      public static void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nullable String itemAnimationsId, @Nullable String animationId, boolean sendToSelf, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to play a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to play the animation on.
      itemAnimationsId - The ID of the item animations to use.
      animationId - The ID of the animation to play.
      sendToSelf - Whether to send the animation packet to the entity itself.
      componentAccessor - The ComponentAccessor for component access.
    • playAnimation

      public static void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nonnull String itemAnimationsId, @Nonnull String animationId, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to play a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to play the animation on.
      itemAnimationsId - The ID of the item animations to use.
      animationId - The ID of the animation to play.
      componentAccessor - The ComponentAccessor for component access.
    • playAnimation

      public static void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nullable ItemPlayerAnimations itemAnimations, @Nonnull String animationId, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to play a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to play the animation on.
      itemAnimations - The item animations to use.
      animationId - The ID of the animation to play.
      componentAccessor - The ComponentAccessor for component access.
    • stopAnimation

      public static void stopAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to stop a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to stop the animation on.
      componentAccessor - The ComponentAccessor for component access.
    • stopAnimation

      public static void stopAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, boolean sendToSelf, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to stop a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to stop the animation on.
      sendToSelf - Whether to send the animation packet to the entity itself.
      componentAccessor - The ComponentAccessor for component access.
    • playAnimation

      public static void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nullable String animationId, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Called to play a specific animation on an entity.
      Parameters:
      ref - The entity reference of the entity.
      animationSlot - The animation slot to play the animation on.
      animationId - The ID of the animation to play.
      componentAccessor - The ComponentAccessor for component access.