Module net.botwithus.rs3
Class PathingEntity<T extends MiniMenuAction>
java.lang.Object
net.botwithus.rs3.game.scene.entities.Entity
net.botwithus.rs3.game.scene.entities.characters.PathingEntity<T>
- All Implemented Interfaces:
Identifiable
,Interactable<T>
,Onymous
,Validatable
,Locatable
public abstract sealed class PathingEntity<T extends MiniMenuAction>
extends Entity
implements Interactable<T>, Onymous
permits Player, Npc
-
Nested Class Summary
Nested classes/interfaces inherited from class net.botwithus.rs3.game.scene.entities.Entity
Entity.Type
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPathingEntity
(int id, Entity.Type type, Coordinate coordinate, String name, String overheadText, int health, int maxHealth, boolean isMoving, int followingIndex, int followingType, int combatLevel, int animationId, Headbar[] headbars, Hitmark[] hitmarks, ScenePosition scene, float dir1, float dir2, int stanceId, List<SpotAnimation> spotAnimations, int serverX, int serverY) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Gets the animation id associated with this pathing entity.@Nullable SequenceType
Gets theSequenceType
associated with this entity.int
Returns the combat level of the PathingEntity.int
Gets the current health of the entity.float
Gets the direction in which the player is facingfloat
Gets the second direction in which the player is facing@Nullable PathingEntity<?>
int
Returns the interactIndex of the PathingEntity.The entity type this entity is followingReturns a non-null of Headbar objects.Returns a non-null of Hitmark objectsgets the spot animations related to this entityint
Returns the maximum health of the entity.@Nullable String
getName()
Returns the name of the PathingEntity.Gets the options available for this InteractableReturns the overhead text of the PathingEntity.Gets the server coordinate of the entityint
Gets the players walking/running stance animationint
hashCode()
boolean
final boolean
Executes the action associated with the given type on this PathingEntity.boolean
isMoving()
Returns whether the PathingEntity is currently moving or not.void
setAnimationId
(int animationId) Sets the animation ID.boolean
validate()
Gets whether the object is valid There can be many reasons aValidatable
may not be valid.Methods inherited from class net.botwithus.rs3.game.scene.entities.Entity
getArea, getCoordinate, getId, getScene, getType
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.botwithus.rs3.game.annotations.Interactable
getDefaultMapper, interact, interact, interact
Methods inherited from interface net.botwithus.rs3.game.Locatable
distanceTo, isReachable
-
Constructor Details
-
PathingEntity
public PathingEntity(int id, Entity.Type type, Coordinate coordinate, String name, String overheadText, int health, int maxHealth, boolean isMoving, int followingIndex, int followingType, int combatLevel, int animationId, Headbar[] headbars, Hitmark[] hitmarks, ScenePosition scene, float dir1, float dir2, int stanceId, List<SpotAnimation> spotAnimations, int serverX, int serverY)
-
-
Method Details
-
getName
Returns the name of the PathingEntity. -
getOverheadText
Returns the overhead text of the PathingEntity.- Returns:
- The overhead text of the PathingEntity.
-
getCurrentHealth
public int getCurrentHealth()Gets the current health of the entity.- Returns:
- The current health of the entity.
-
getMaximumHealth
public int getMaximumHealth()Returns the maximum health of the entity.- Returns:
- The maximum health of the entity.
-
isMoving
public boolean isMoving()Returns whether the PathingEntity is currently moving or not.- Returns:
- true if the PathingEntity is currently moving, false otherwise
-
getFollowingIndex
public int getFollowingIndex()Returns the interactIndex of the PathingEntity.- Returns:
- the interactIndex of the PathingEntity
-
getFollowingType
The entity type this entity is following- Returns:
- The following type
-
getCombatLevel
public int getCombatLevel()Returns the combat level of the PathingEntity.- Returns:
- The combat level of the PathingEntity.
-
getAnimationId
public int getAnimationId()Gets the animation id associated with this pathing entity.- Returns:
- The animation id associated with this pathing entity.
-
setAnimationId
public void setAnimationId(int animationId) Sets the animation ID.- Parameters:
animationId
- The animation ID to set.
-
getAnimationType
Gets theSequenceType
associated with this entity.- Returns:
- The
SequenceType
associated with this animation.
-
interact
Executes the action associated with the given type on this PathingEntity.- Specified by:
interact
in interfaceInteractable<T extends MiniMenuAction>
- Parameters:
minimenuAction
- The type of action to execute.- Returns:
- True if the action was successful, false otherwise.
-
interact
- Specified by:
interact
in interfaceInteractable<T extends MiniMenuAction>
-
getHeadbars
Returns a non-null of Headbar objects.- Returns:
- a non-null of Headbar objects.
-
getHitmarks
Returns a non-null of Hitmark objects- Returns:
- a non-null list of Hitmark objects
-
getFollowing
-
validate
public boolean validate()Description copied from interface:Validatable
Gets whether the object is valid There can be many reasons aValidatable
may not be valid. These can range from the entity has despawned, a component has closed, a coordinate is no longer in the scene, an animation sequence has ended, and many other reasons..- Specified by:
validate
in interfaceValidatable
- Returns:
- true if the object passes validation, otherwise false
-
getOptions
Description copied from interface:Interactable
Gets the options available for this Interactable- Specified by:
getOptions
in interfaceInteractable<T extends MiniMenuAction>
- Returns:
- a list of strings containing the options
-
getStanceId
public int getStanceId()Gets the players walking/running stance animation- Returns:
- the animation id
-
getDirection1
public float getDirection1()Gets the direction in which the player is facing- Returns:
- the direction represented as a float
-
getDirection2
public float getDirection2()Gets the second direction in which the player is facing- Returns:
- the second direction represented as a float
-
getLinkedSpotAnims
gets the spot animations related to this entity- Returns:
- The spot animations
-
equals
-
getServerCoordinate
Gets the server coordinate of the entity- Returns:
- The server coordinate
-
hashCode
public int hashCode()
-