Class OSRSCacheModelEntity
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.Entity
-
- com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
-
- All Implemented Interfaces:
Interactable
,Locatable
,Modeled
,Renderable
,LocatableEntity
,Validatable
- Direct Known Subclasses:
OSRSEntity
,OSRSGroundItem
,OSRSProjectile
,OSRSSpotAnimation
public abstract class OSRSCacheModelEntity extends Entity
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
click()
Clicks this entity in an interactable pointboolean
contains(java.awt.Point point)
Checks if the projected bounds of this entity contains the Point provided.Area.Rectangular
getArea(Coordinate regionBase)
Gets the area using the region base as the coordinate to offset from.@Nullable InteractablePoint
getInteractionPoint(java.awt.Point origin)
Gets a point within the entity that can be interacted with.double
getVisibility()
Returns a rough estimate of how visible this entity is as a percent (0 to 100)boolean
interact(java.util.regex.Pattern action, java.util.regex.Pattern target)
Attempts to match action and target using Matcher.find() and then interacts with the appropriate menu itemboolean
isHovered()
Gets whether or not this entity is being hovered.boolean
isVisible()
Whether the entity is visible-
Methods inherited from class com.runemate.game.api.hybrid.entities.Entity
equals, hasDynamicBounds, hashCode, isValid, releaseUidOnGarbageCollection, render, render, setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Interactable
getInteractionPoint, hover, interact, interact, interact, interact, interact
-
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, getHighPrecisionPosition, getHighPrecisionPosition, getPosition, getPosition
-
-
-
-
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 ignoredtarget
- 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)
-
-