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
ConstructorsConstructorDescriptionPathingEntity(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 TypeMethodDescriptionbooleanintGets the animation id associated with this pathing entity.@Nullable SequenceTypeGets theSequenceTypeassociated with this entity.intReturns the combat level of the PathingEntity.intGets the current health of the entity.floatGets the direction in which the player is facingfloatGets the second direction in which the player is facing@Nullable PathingEntity<?>intReturns 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 entityintReturns the maximum health of the entity.@Nullable StringgetName()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 entityintGets the players walking/running stance animationinthashCode()booleanfinal booleanExecutes the action associated with the given type on this PathingEntity.booleanisMoving()Returns whether the PathingEntity is currently moving or not.voidsetAnimationId(int animationId) Sets the animation ID.booleanvalidate()Gets whether the object is valid There can be many reasons aValidatablemay not be valid.Methods inherited from class net.botwithus.rs3.game.scene.entities.Entity
getArea, getCoordinate, getId, getScene, getTypeMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.botwithus.rs3.game.annotations.Interactable
getDefaultMapper, interact, interact, interactMethods 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 theSequenceTypeassociated with this entity.- Returns:
- The
SequenceTypeassociated with this animation.
-
interact
Executes the action associated with the given type on this PathingEntity.- Specified by:
interactin interfaceInteractable<T extends MiniMenuAction>- Parameters:
minimenuAction- The type of action to execute.- Returns:
- True if the action was successful, false otherwise.
-
interact
- Specified by:
interactin 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:ValidatableGets whether the object is valid There can be many reasons aValidatablemay 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:
validatein interfaceValidatable- Returns:
- true if the object passes validation, otherwise false
-
getOptions
Description copied from interface:InteractableGets the options available for this Interactable- Specified by:
getOptionsin 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()
-