Class OSRSGroundItem
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.Entity
-
- com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
-
- com.runemate.game.api.osrs.entities.OSRSGroundItem
-
- All Implemented Interfaces:
Identifiable
,Interactable
,Locatable
,Modeled
,Renderable
,GroundItem
,Item
,LocatableEntity
,Validatable
public final class OSRSGroundItem extends OSRSCacheModelEntity implements GroundItem
-
-
Constructor Summary
Constructors Constructor Description OSRSGroundItem(long item_node_uid, Coordinate position)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
ItemDefinition
getDefinition()
The definition of the item.Coordinate.HighPrecision
getHighPrecisionPosition(Coordinate regionBase)
Gets the high precision position using the region base as the coordinate to offset from.int
getId()
Model
getModel()
Gets the polygon-based model of the entityCoordinate
getPosition(Coordinate regionBase)
Gets the position using the region base as the coordinate to offset from.int
getQuantity()
The quantity of the item, also known as stack sizeboolean
interact(@Nullable java.util.regex.Pattern action)
boolean
interact(java.lang.String action)
boolean
isValid()
Verifies whether this entity is valid and still exists, typically on the world-graphboolean
take()
CallsInteractable.interact(String)
with "Take" as the action.java.lang.String
toString()
-
Methods inherited from class com.runemate.game.api.osrs.entities.OSRSCacheModelEntity
click, contains, getArea, getInteractionPoint, getVisibility, interact, isHovered, isVisible
-
Methods inherited from class com.runemate.game.api.hybrid.entities.Entity
hasDynamicBounds, hashCode, releaseUidOnGarbageCollection, render, render, setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Interactable
click, contains, getInteractionPoint, getInteractionPoint, getVisibility, hasDynamicBounds, hover, interact, interact, interact, interact, isHovered, isVisible
-
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, getArea, getHighPrecisionPosition, getPosition
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Modeled
setBackupModel, setBackupModel, setBackupModel, setForcedModel, setForcedModel, setForcedModel
-
Methods inherited from interface com.runemate.game.api.hybrid.entities.details.Renderable
render, render
-
-
-
-
Constructor Detail
-
OSRSGroundItem
public OSRSGroundItem(long item_node_uid, Coordinate position)
-
-
Method Detail
-
getId
public int getId()
- Specified by:
getId
in interfaceIdentifiable
-
getQuantity
public int getQuantity()
Description copied from interface:Item
The quantity of the item, also known as stack size- Specified by:
getQuantity
in interfaceItem
-
getDefinition
public ItemDefinition getDefinition()
Description copied from interface:Item
The definition of the item.- Specified by:
getDefinition
in interfaceItem
-
take
public boolean take()
Description copied from interface:GroundItem
CallsInteractable.interact(String)
with "Take" as the action.- Specified by:
take
in interfaceGroundItem
-
interact
public boolean interact(@Nullable @Nullable java.util.regex.Pattern action)
- Specified by:
interact
in interfaceInteractable
-
getModel
public Model getModel()
Description copied from interface:Modeled
Gets the polygon-based model of the entity
-
getPosition
public Coordinate getPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the position using the region base as the coordinate to offset from. For optimization.- Specified by:
getPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
getHighPrecisionPosition
public Coordinate.HighPrecision getHighPrecisionPosition(Coordinate regionBase)
Description copied from interface:LocatableEntity
Gets the high precision position using the region base as the coordinate to offset from. For optimization.- Specified by:
getHighPrecisionPosition
in interfaceLocatableEntity
- Parameters:
regionBase
- The Coordinate base of the loaded region
-
interact
public boolean interact(java.lang.String action)
- Specified by:
interact
in interfaceInteractable
-
isValid
public boolean isValid()
Description copied from interface:Validatable
Verifies whether this entity is valid and still exists, typically on the world-graph- Specified by:
isValid
in interfaceValidatable
- Overrides:
isValid
in classEntity
- Returns:
- true if it's still available, otherwise false
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-