Class RuneLiteObject

    • Constructor Detail

      • RuneLiteObject

        public RuneLiteObject​(Client client)
    • Method Detail

      • setShouldLoop

        @Deprecated
        public void setShouldLoop​(boolean shouldLoop)
        Sets whether the animation of the RuneLiteObject should loop when the animation ends. If this is false the object will despawn when the animation ends. Does nothing if the animation is null.
      • setAnimation

        public void setAnimation​(Animation animation)
        Sets the animation of the RuneLiteObject. If animation is null, the model will be static.
      • setAnimationController

        public void setAnimationController​(@Nullable
                                           AnimationController animationController)
        Sets the animation controller of the RuneLiteObject. If animationController is null, the model will be static.
      • setActive

        public void setActive​(boolean active)
        Sets the state of the RuneLiteObject. Set to true to spawn the object. Set to false to despawn the object.
      • isActive

        public boolean isActive()
        Gets the state of the RuneLiteObject
        Returns:
        true if the RuneLiteObject is added to the scene
      • tick

        public void tick​(int ticksSinceLastFrame)
        Called every frame the RuneLiteObject is registered and in the scene
        Overrides:
        tick in class RuneLiteObjectController
        Parameters:
        ticksSinceLastFrame - The number of client ticks since the last frame
      • getModel

        public Model getModel()
        Called every frame to get a model to render. The returned model is not modified and can be a shared model.
        Specified by:
        getModel in class RuneLiteObjectController
      • finished

        @Deprecated
        public boolean finished()
        Deprecated.
        Use a custom AnimationController instead.
      • setFinished

        @Deprecated
        public void setFinished​(boolean finished)
        Deprecated.
        Use a custom AnimationController instead to despawn the object when it completes its animation.
      • getBaseModel

        public Model getBaseModel()
      • getAnimationController

        @Nullable
        public AnimationController getAnimationController()
        The animation of the RuneLiteObject. If animation is null then the model will be static.
      • setPoseAnimationController

        public void setPoseAnimationController​(@Nullable
                                               AnimationController poseAnimationController)
        The optional pose animation of the RuneLiteObject. If animation is null then the model from animationController will be used.
      • getPoseAnimationController

        @Nullable
        public AnimationController getPoseAnimationController()
        The optional pose animation of the RuneLiteObject. If animation is null then the model from animationController will be used.
      • getStartCycle

        public int getStartCycle()
      • setStartCycle

        public void setStartCycle​(int startCycle)