Class OSRSCacheModelEntity

    • Method Detail

      • getArea

        @Nullable
        public Area.Rectangular getArea​(Coordinate regionBase)
        Description copied from interface: LocatableEntity
        Gets the area using the region base as the coordinate to offset from. For optimization.
        Parameters:
        regionBase - The Coordinate base of the loaded region
      • getInteractionPoint

        @Nullable
        public @Nullable InteractablePoint getInteractionPoint​(java.awt.Point origin)
        Description copied from interface: Interactable
        Gets a point within the entity that can be interacted with. Takes into account the direction of movement from the origin point.
      • isHovered

        public boolean isHovered()
        Description copied from interface: Interactable
        Gets whether or not this entity is being hovered.
        Returns:
        true if the entity is currently being hovered, otherwise false.
      • contains

        public boolean contains​(java.awt.Point point)
        Description copied from interface: Interactable
        Checks if the projected bounds of this entity contains the Point provided.
        Returns:
      • click

        public final boolean click()
        Description copied from interface: Interactable
        Clicks this entity in an interactable point
        Returns:
        true if successfully clicked
      • interact

        public final boolean interact​(java.util.regex.Pattern action,
                                      java.util.regex.Pattern target)
        Description copied from interface: Interactable
        Attempts to match action and target using Matcher.find() and then interacts with the appropriate menu item
        Parameters:
        action - The pattern to match the action with, if null it's ignored
        target - The pattern to match the target with, if null it's ignored
      • isVisible

        public boolean isVisible()
        Description copied from interface: Interactable
        Whether the entity is visible
        Returns:
        true if visible, and false if not visible
      • getVisibility

        public double getVisibility()
        Description copied from interface: Interactable
        Returns a rough estimate of how visible this entity is as a percent (0 to 100)