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 boolean
finished()
Deprecated.Use a customAnimationController
instead.Animation
getAnimation()
Deprecated.UsegetAnimationController()
orgetPoseAnimationController()
followed byAnimationController.getFrame()
.AnimationController
getAnimationController()
The animation of the RuneLiteObject.int
getAnimationFrame()
Deprecated.UsegetAnimationController()
orgetPoseAnimationController()
followed byAnimationController.getFrame()
.Model
getBaseModel()
Model
getModel()
Called every frame to get a model to render.AnimationController
getPoseAnimationController()
The optional pose animation of the RuneLiteObject.int
getStartCycle()
boolean
isActive()
Gets the state of the RuneLiteObjectvoid
setActive(boolean active)
Sets the state of the RuneLiteObject.void
setAnimation(Animation animation)
Sets the animation of the RuneLiteObject.void
setAnimationController(AnimationController animationController)
Sets the animation controller of the RuneLiteObject.void
setFinished(boolean finished)
Deprecated.Use a customAnimationController
instead to despawn the object when it completes its animation.void
setLocation(LocalPoint point, int level)
Sets the location in the scene for the RuneLiteObjectvoid
setModel(Model baseModel)
Sets the model to be rendered.void
setPoseAnimationController(AnimationController poseAnimationController)
The optional pose animation of the RuneLiteObject.void
setShouldLoop(boolean shouldLoop)
Deprecated.UseAnimationController.setOnFinished(Consumer)
withAnimationController.loop()
instead.void
setStartCycle(int startCycle)
void
tick(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. IfanimationController
is 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:
setLocation
in 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:
tick
in 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:
getModel
in classRuneLiteObjectController
-
finished
@Deprecated public boolean finished()
Deprecated.Use a customAnimationController
instead.
-
setFinished
@Deprecated public void setFinished(boolean finished)
Deprecated.Use a customAnimationController
instead 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 fromanimationController
will be used.
-
getPoseAnimationController
@Nullable public AnimationController getPoseAnimationController()
The optional pose animation of the RuneLiteObject. If animation is null then the model fromanimationController
will be used.
-
getStartCycle
public int getStartCycle()
-
setStartCycle
public void setStartCycle(int startCycle)
-
-