Class OSRSProjectile
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.Entity
-
- com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
-
- com.runemate.game.api.osrs.entities.OSRSProjectile
-
- All Implemented Interfaces:
Animable
,Identifiable
,Interactable
,Locatable
,Modeled
,Renderable
,Rotatable
,LocatableEntity
,Projectile
,Validatable
public final class OSRSProjectile extends OSRSCacheModelEntity implements Projectile
-
-
Constructor Summary
Constructors Constructor Description OSRSProjectile(long uid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAnimationId()
Gets the entities current animation idSpotAnimationDefinition
getDefinition()
int
getHighPrecisionOrientation()
For internal usage only.Coordinate.HighPrecision
getHighPrecisionPosition(Coordinate regionBase)
Gets the high precision position using the region base as the coordinate to offset from.int
getId()
An id that can be used to identify this projectileint
getImpactCycle()
int
getLaunchCycle()
Coordinate
getLaunchPosition()
Model
getModel()
Gets the polygon-based model of the entityint
getOrientationAsAngle()
Gets the current orientation as an angle.Coordinate
getPosition(Coordinate regionBase)
Gets the position using the region base as the coordinate to offset from.Actor
getSource()
The character that this projectile originated from.int
getSpotAnimationId()
Actor
getTarget()
The character that this projectile is targeting/attackingboolean
hasLaunched()
boolean
isValid()
Verifies whether this entity is valid and still exists, typically on the world-graphjava.lang.String
toString()
-
Methods inherited from class com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
click, contains, getArea, getInteractionPoint, getVisibility, interact, isHovered, isVisible
-
Methods inherited from class com.runemate.game.api.hybrid.entities.Entity
equals, hasDynamicBounds, hashCode, releaseUidOnGarbageCollection, render, render, setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Interactable
click, contains, getInteractionPoint, getInteractionPoint, getVisibility, hasDynamicBounds, hover, interact, interact, interact, interact, interact, interact, isHovered, isVisible
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Locatable
distanceTo, distanceTo, getLocalPosition
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.LocatableEntity
getArea, getArea, getHighPrecisionPosition, getPosition
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Modeled
setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Renderable
render, render
-
-
-
-
Method Detail
-
getId
public int getId()
Description copied from interface:Projectile
An id that can be used to identify this projectile- Specified by:
getId
in interfaceIdentifiable
- Specified by:
getId
in interfaceProjectile
-
getHighPrecisionOrientation
public int getHighPrecisionOrientation()
Description copied from interface:Rotatable
For internal usage only. Subject to removal without notice.- Specified by:
getHighPrecisionOrientation
in interfaceRotatable
-
getOrientationAsAngle
public int getOrientationAsAngle()
Description copied from interface:Rotatable
Gets the current orientation as an angle.- Specified by:
getOrientationAsAngle
in interfaceRotatable
-
getSource
@RS3Only public Actor getSource()
Description copied from interface:Projectile
The character that this projectile originated from. This information is only available on RS3- Specified by:
getSource
in interfaceProjectile
-
getTarget
public Actor getTarget()
Description copied from interface:Projectile
The character that this projectile is targeting/attacking- Specified by:
getTarget
in interfaceProjectile
- Returns:
- The character if available, otherwise null
-
getSpotAnimationId
public int getSpotAnimationId()
- Specified by:
getSpotAnimationId
in interfaceProjectile
-
getDefinition
public SpotAnimationDefinition getDefinition()
- Specified by:
getDefinition
in interfaceProjectile
-
getLaunchCycle
@OSRSOnly public int getLaunchCycle()
- Specified by:
getLaunchCycle
in interfaceProjectile
-
getImpactCycle
@OSRSOnly public int getImpactCycle()
- Specified by:
getImpactCycle
in interfaceProjectile
-
getLaunchPosition
@OSRSOnly public Coordinate getLaunchPosition()
- Specified by:
getLaunchPosition
in interfaceProjectile
-
hasLaunched
public boolean hasLaunched()
- Specified by:
hasLaunched
in interfaceProjectile
-
getModel
public Model getModel()
Description copied from interface:Modeled
Gets the polygon-based model of the entity
-
getPosition
public Coordinate getPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the position using the region base as the coordinate to offset from. For optimization.- Specified by:
getPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
getHighPrecisionPosition
public Coordinate.HighPrecision getHighPrecisionPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the high precision position using the region base as the coordinate to offset from. For optimization.- Specified by:
getHighPrecisionPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
isValid
public boolean isValid()
Description copied from interface:Validatable
Verifies whether this entity is valid and still exists, typically on the world-graph- Specified by:
isValid
in interfaceValidatable
- Overrides:
isValid
in classEntity
- Returns:
- true if it's still available, otherwise false
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAnimationId
public int getAnimationId()
Description copied from interface:Animable
Gets the entities current animation id- Specified by:
getAnimationId
in interfaceAnimable
- Returns:
- the current animation id, or if unavailable -1
-
-