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
Direct Known Subclasses:
Npc, Player

public abstract sealed class PathingEntity<T extends MiniMenuAction> extends Entity implements Interactable<T>, Onymous permits Player, Npc
  • 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

      @Nullable public @Nullable String getName()
      Returns the name of the PathingEntity.
      Specified by:
      getName in interface Onymous
      Returns:
      The name of the PathingEntity.
    • getOverheadText

      public String 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

      public Entity.Type 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

      @Nullable public @Nullable SequenceType getAnimationType()
      Gets the SequenceType associated with this entity.
      Returns:
      The SequenceType associated with this animation.
    • interact

      public final boolean interact(@NotNull T minimenuAction)
      Executes the action associated with the given type on this PathingEntity.
      Specified by:
      interact in interface Interactable<T extends MiniMenuAction>
      Parameters:
      minimenuAction - The type of action to execute.
      Returns:
      True if the action was successful, false otherwise.
    • interact

      public boolean interact(Integer option)
      Specified by:
      interact in interface Interactable<T extends MiniMenuAction>
    • getHeadbars

      @NotNull public @NotNull List<Headbar> getHeadbars()
      Returns a non-null of Headbar objects.
      Returns:
      a non-null of Headbar objects.
    • getHitmarks

      @NotNull public @NotNull List<Hitmark> getHitmarks()
      Returns a non-null of Hitmark objects
      Returns:
      a non-null list of Hitmark objects
    • getFollowing

      @Nullable public @Nullable PathingEntity<?> getFollowing()
    • validate

      public boolean validate()
      Description copied from interface: Validatable
      Gets whether the object is valid There can be many reasons a Validatable 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 interface Validatable
      Returns:
      true if the object passes validation, otherwise false
    • getOptions

      @NotNull public @NotNull List<String> getOptions()
      Description copied from interface: Interactable
      Gets the options available for this Interactable
      Specified by:
      getOptions in interface Interactable<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

      public List<SpotAnimation> getLinkedSpotAnims()
      gets the spot animations related to this entity
      Returns:
      The spot animations
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Entity
    • getServerCoordinate

      public Coordinate getServerCoordinate()
      Gets the server coordinate of the entity
      Returns:
      The server coordinate
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Entity