Class Animations


  • public class Animations
    extends java.lang.Object
    Manages animations received from the server. Animations are uniquely identified by an animation id. Each animation consists of a list of faces.
    • Constructor Summary

      Constructors 
      Constructor Description
      Animations​(@Nullable GuiStateManager guiStateManager)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAnimation​(int animationId, int flags, int @NotNull [] faces)
      Defines a new animation.
      @Nullable Animation get​(int animationId)
      Returns the animation for an animation id.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Animations

        public Animations​(@Nullable
                          @Nullable GuiStateManager guiStateManager)
        Creates a new instance.
        Parameters:
        guiStateManager - the gui state manager to watch; null to not watch
    • Method Detail

      • addAnimation

        public void addAnimation​(int animationId,
                                 int flags,
                                 int @NotNull [] faces)
        Defines a new animation.
        Parameters:
        animationId - the animation id
        flags - flags for the animation; currently unused
        faces - the faces list of the animation
      • get

        @Nullable
        public @Nullable Animation get​(int animationId)
        Returns the animation for an animation id.
        Parameters:
        animationId - the animation id
        Returns:
        the animation instance, or null if the animation id does not exist