Package net.runelite.api
Class RuneLiteObject
- java.lang.Object
-
- net.runelite.api.RuneLiteObjectController
-
- net.runelite.api.RuneLiteObject
-
public class RuneLiteObject extends RuneLiteObjectController
-
-
Constructor Summary
Constructors Constructor Description RuneLiteObject(Client client)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanfinished()Deprecated.Use a customAnimationControllerinstead.AnimationgetAnimation()Deprecated.UsegetAnimationController()orgetPoseAnimationController()followed byAnimationController.getFrame().AnimationControllergetAnimationController()The animation of the RuneLiteObject.intgetAnimationFrame()Deprecated.UsegetAnimationController()orgetPoseAnimationController()followed byAnimationController.getFrame().ModelgetBaseModel()ModelgetModel()Called every frame to get a model to render.AnimationControllergetPoseAnimationController()The optional pose animation of the RuneLiteObject.intgetStartCycle()booleanisActive()Gets the state of the RuneLiteObjectvoidsetActive(boolean active)Sets the state of the RuneLiteObject.voidsetAnimation(Animation animation)Sets the animation of the RuneLiteObject.voidsetAnimationController(AnimationController animationController)Sets the animation controller of the RuneLiteObject.voidsetFinished(boolean finished)Deprecated.Use a customAnimationControllerinstead to despawn the object when it completes its animation.voidsetLocation(LocalPoint point, int level)Sets the location in the scene for the RuneLiteObjectvoidsetModel(Model baseModel)Sets the model to be rendered.voidsetPoseAnimationController(AnimationController poseAnimationController)The optional pose animation of the RuneLiteObject.voidsetShouldLoop(boolean shouldLoop)Deprecated.UseAnimationController.setOnFinished(Consumer)withAnimationController.loop()instead.voidsetStartCycle(int startCycle)voidtick(int ticksSinceLastFrame)Called every frame the RuneLiteObject is registered and in the scene-
Methods inherited from class net.runelite.api.RuneLiteObjectController
getLevel, getLocation, getOrientation, getRadius, getWorldView, getX, getY, getZ, isDrawFrontTilesFirst, setDrawFrontTilesFirst, setLevel, setOrientation, setRadius, setWorldView, setX, setY, setZ
-
-
-
-
Constructor Detail
-
RuneLiteObject
public RuneLiteObject(Client client)
-
-
Method Detail
-
setShouldLoop
@Deprecated public void setShouldLoop(boolean shouldLoop)
Deprecated.UseAnimationController.setOnFinished(Consumer)withAnimationController.loop()instead.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.
-
setModel
public void setModel(Model baseModel)
Sets the model to be rendered. IfanimationControlleris not null, this model will be passed toAnimationController.animate(Model).
-
setLocation
public void setLocation(LocalPoint point, int level)
Sets the location in the scene for the RuneLiteObject- Overrides:
setLocationin classRuneLiteObjectController
-
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:
tickin classRuneLiteObjectController- 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:
getModelin classRuneLiteObjectController
-
finished
@Deprecated public boolean finished()
Deprecated.Use a customAnimationControllerinstead.
-
setFinished
@Deprecated public void setFinished(boolean finished)
Deprecated.Use a customAnimationControllerinstead to despawn the object when it completes its animation.
-
getAnimation
public Animation getAnimation()
Deprecated.UsegetAnimationController()orgetPoseAnimationController()followed byAnimationController.getFrame().
-
getAnimationFrame
@Deprecated public int getAnimationFrame()
Deprecated.UsegetAnimationController()orgetPoseAnimationController()followed byAnimationController.getFrame().
-
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 fromanimationControllerwill be used.
-
getPoseAnimationController
@Nullable public AnimationController getPoseAnimationController()
The optional pose animation of the RuneLiteObject. If animation is null then the model fromanimationControllerwill be used.
-
getStartCycle
public int getStartCycle()
-
setStartCycle
public void setStartCycle(int startCycle)
-
-