Package net.runelite.api
Interface Projectile
-
- All Superinterfaces:
Node,Renderable
public interface Projectile extends Renderable
Represents a projectile entity. (ie. cannonball, arrow)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description AnimationgetAnimation()The animation of the projectileintgetAnimationFrame()The frame of the current animationintgetEndCycle()Gets the game cycle that the projectile will reach its target at.intgetEndHeight()Gets the ending height of the projectile.intgetFloor()Deprecated.intgetHeight()Deprecated.intgetId()Gets the ID of the projectile.default ActorgetInteracting()Deprecated.intgetOrientation()Get the projectile orientation in JAUintgetRemainingCycles()Gets the remaining game cycles until the projectile reaches its target and despawns.intgetSlope()Gets the slope of the projectile.ActorgetSourceActor()Get the actor the projectile starts at.intgetSourceLevel()Get the level the projectile starts on.WorldPointgetSourcePoint()Get the point the projectile starts at.intgetStartCycle()Gets the game cycle that the projectile begun movement at.intgetStartHeight()Gets the starting height of the projectile.intgetStartPos()Get the offset position from the start position where the projectile startsLocalPointgetTarget()Deprecated.ActorgetTargetActor()Get the actor the projectile ends at.intgetTargetLevel()Get the level the projectile ends on.WorldPointgetTargetPoint()Get the point the projectile ends at.doublegetX()Gets the current x-axis coordinate of the projectile.intgetX1()Deprecated.doublegetY()Gets the current y-axis coordinate of the projectile.intgetY1()Deprecated.doublegetZ()Gets the current z-axis coordinate of the projectile.voidsetEndCycle(int cycle)Sets the game cycle the projectile will reach its target at.-
Methods inherited from interface net.runelite.api.Node
getHash, getNext, getPrevious
-
Methods inherited from interface net.runelite.api.Renderable
getModel, getModelHeight, setModelHeight
-
-
-
-
Method Detail
-
getId
int getId()
Gets the ID of the projectile.- Returns:
- the projectile ID
- See Also:
SpotanimID
-
getSourceLevel
int getSourceLevel()
Get the level the projectile starts on.- Returns:
-
getSourcePoint
WorldPoint getSourcePoint()
Get the point the projectile starts at.- Returns:
-
getSourceActor
@Nullable Actor getSourceActor()
Get the actor the projectile starts at.- Returns:
-
getTargetLevel
int getTargetLevel()
Get the level the projectile ends on.- Returns:
-
getTargetPoint
WorldPoint getTargetPoint()
Get the point the projectile ends at.- Returns:
-
getTargetActor
@Nullable Actor getTargetActor()
Get the actor the projectile ends at.- Returns:
-
getInteracting
@Deprecated default Actor getInteracting()
Deprecated.Gets the actor that is targeted by this projectile.- Returns:
- the target actor, or null if this projectile is an AoE attack
-
getTarget
@Deprecated LocalPoint getTarget()
Deprecated.Get the target point of the projectile. For projectiles with an actor target, this is updated each frame to the actor position.- Returns:
-
getX1
@Deprecated int getX1()
Deprecated.Gets the original x-axis coordinate that this projectile started from.- Returns:
- the original coordinate
-
getY1
@Deprecated int getY1()
Deprecated.Gets the original y-axis coordinate that this projectile started from.- Returns:
- the original coordinate
-
getFloor
@Deprecated int getFloor()
Deprecated.Gets the plane that the projectile is on.- Returns:
- the plane
-
getHeight
@Deprecated int getHeight()
Deprecated.Gets the height of the projectile.- Returns:
- the height
-
getEndHeight
int getEndHeight()
Gets the ending height of the projectile.- Returns:
- the ending height
-
getStartCycle
int getStartCycle()
Gets the game cycle that the projectile begun movement at.- Returns:
- the start game cycle
-
getEndCycle
int getEndCycle()
Gets the game cycle that the projectile will reach its target at.- Returns:
- the end game cycle
-
setEndCycle
void setEndCycle(int cycle)
Sets the game cycle the projectile will reach its target at. The projectile automatically despawns after this time, and setting the end cycle to a time in the past is an effective way of removing the projectile.- Parameters:
cycle-
-
getRemainingCycles
int getRemainingCycles()
Gets the remaining game cycles until the projectile reaches its target and despawns.- Returns:
- the remaining game cycles
-
getSlope
int getSlope()
Gets the slope of the projectile.This value indicates how much arc the projectile can have. Projectiles with larger slopes have a more noticeable arc when thrown.
- Returns:
- the slope of the projectile
-
getStartPos
int getStartPos()
Get the offset position from the start position where the projectile starts- Returns:
-
getStartHeight
int getStartHeight()
Gets the starting height of the projectile.- Returns:
- the starting height
-
getX
double getX()
Gets the current x-axis coordinate of the projectile.- Returns:
- the x-axis coordinate
-
getY
double getY()
Gets the current y-axis coordinate of the projectile.- Returns:
- the y-axis coordinate
-
getZ
double getZ()
Gets the current z-axis coordinate of the projectile.- Returns:
- the z-axis coordinate
-
getOrientation
int getOrientation()
Get the projectile orientation in JAU- Returns:
-
getAnimation
@Nullable Animation getAnimation()
The animation of the projectile- Returns:
-
getAnimationFrame
int getAnimationFrame()
The frame of the current animation- Returns:
-
-