Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- playAnimation(Ref, AnimationSlot, String, boolean, ComponentAccessor)
- playAnimation(Ref, AnimationSlot, String, String, boolean, ComponentAccessor)
- playAnimation(Ref, AnimationSlot, String, String, ComponentAccessor)
- playAnimation(Ref, AnimationSlot, ItemPlayerAnimations, String, ComponentAccessor)
- stopAnimation(Ref, AnimationSlot, ComponentAccessor)
- stopAnimation(Ref, AnimationSlot, boolean, ComponentAccessor)
- playAnimation(Ref, AnimationSlot, String, ComponentAccessor)
Class AnimationUtils
java.lang.Object
com.hypixel.hytale.server.core.entity.AnimationUtils
A utility class that contains utility functions for animations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, ItemPlayerAnimations itemAnimations, String animationId, ComponentAccessor<EntityStore> componentAccessor) Called to play a specific animation on an entity.static voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, String animationId, boolean sendToSelf, ComponentAccessor<EntityStore> componentAccessor) Called to play a specific animation on an entity.static voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, String animationId, ComponentAccessor<EntityStore> componentAccessor) Called to play a specific animation on an entity.static voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, String itemAnimationsId, String animationId, boolean sendToSelf, ComponentAccessor<EntityStore> componentAccessor) Called to play a specific animation on an entity.static voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, String itemAnimationsId, String animationId, ComponentAccessor<EntityStore> componentAccessor) Called to play a specific animation on an entity.static voidstopAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, boolean sendToSelf, ComponentAccessor<EntityStore> componentAccessor) Called to stop a specific animation on an entity.static voidstopAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, ComponentAccessor<EntityStore> componentAccessor) Called to stop a specific animation on an entity.
-
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- TheComponentAccessorfor 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- TheComponentAccessorfor 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- TheComponentAccessorfor 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- TheComponentAccessorfor 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- TheComponentAccessorfor 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- TheComponentAccessorfor 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- TheComponentAccessorfor component access.
-