Package org.tribot.script.sdk.types
Class Projectile
- java.lang.Object
-
- org.tribot.script.sdk.types.Projectile
-
- All Implemented Interfaces:
Modellable
,Positionable
public class Projectile extends java.lang.Object implements Modellable, Positionable
Represents a projectile in the air, such as an arrow or a spell- See Also:
Query.projectiles()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
adjustCameraTo()
Moves the camera to a position where the given entity or position is in view.boolean
equals(java.lang.Object o)
WorldTile
getDestination()
Gets the expected destination tile of this projectile.int
getGraphicId()
org.tribot.api2007.types.RSProjectile
getLegacyProjectile()
java.util.Optional<Model>
getModel()
Gets the entity modelint
getOrientation()
WorldTile
getStart()
Gets the start tile of this projectileWorldTile
getTile()
Gets the WorldTile of this entity/positionint
hashCode()
boolean
isMoving()
boolean
isTargetingMe()
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.tribot.script.sdk.interfaces.Positionable
distance, distanceTo
-
-
-
-
Method Detail
-
getLegacyProjectile
public org.tribot.api2007.types.RSProjectile getLegacyProjectile()
-
getOrientation
public int getOrientation()
-
getGraphicId
public int getGraphicId()
-
isMoving
public boolean isMoving()
-
isTargetingMe
public boolean isTargetingMe()
-
getTile
public WorldTile getTile()
Description copied from interface:Positionable
Gets the WorldTile of this entity/position- Specified by:
getTile
in interfacePositionable
-
getStart
public WorldTile getStart()
Gets the start tile of this projectile- Returns:
- the start tile of this projectile
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getDestination
public WorldTile getDestination()
Gets the expected destination tile of this projectile. For AoE attacks, this will generally be some tile. For projectiles targeting a player or NPC, this will generally be the position of that target.- Returns:
- the expected destination tile of this projectile
-
adjustCameraTo
public boolean adjustCameraTo()
Description copied from interface:Positionable
Moves the camera to a position where the given entity or position is in view. Takes into account distance. Uses an algorithm to move both the angle and rotation of the camera simultaneously at pseudo-random intervals to simulate human camera movement.- Specified by:
adjustCameraTo
in interfacePositionable
- Returns:
- True if the camera moved. False otherwise.
-
getModel
public java.util.Optional<Model> getModel()
Description copied from interface:Modellable
Gets the entity model- Specified by:
getModel
in interfaceModellable
- Returns:
- the entity model, or an empty optional if the model could not be obtained (ex. not visible on screen)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-