Class Entity
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.Entity
-
- All Implemented Interfaces:
Interactable
,Locatable
,Modeled
,Renderable
,LocatableEntity
,Validatable
- Direct Known Subclasses:
OSRSCacheModelEntity
public abstract class Entity extends java.lang.Object implements Modeled, LocatableEntity
-
-
Field Summary
Fields Modifier and Type Field Description long
uid
-
Constructor Summary
Constructors Constructor Description Entity(long uid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
boolean
hasDynamicBounds()
int
hashCode()
boolean
isValid()
Verifies whether this entity is valid and still exists, typically on the world-graphvoid
releaseUidOnGarbageCollection(boolean release)
void
render(java.awt.Graphics2D g2d)
Renders this entity onto the givenGraphics2D
, use is discouragedvoid
render(javafx.scene.canvas.GraphicsContext gc)
Renders this entity onto the givenGraphicsContext
void
setBackupModel(int[] frontBottomLeft, int[] backTopRight)
Sets a backup model to be used when the model isn't available.void
setBackupModel(Model backup)
void
setBackupModel(com.runemate.game.api.hybrid.util.collections.Pair<int[],int[]> values)
Sets a pair of points to be used to create a backup model when the in-game model isn't availablevoid
setForcedModel(int[] frontBottomLeft, int[] backTopRight)
Sets a model to be used regardless of whether the in-game model is available.void
setForcedModel(Model forced)
void
setForcedModel(com.runemate.game.api.hybrid.util.collections.Pair<int[],int[]> values)
Sets a pair of points to be used to create a model regardless of whether the in-game model is available-
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
click, contains, getInteractionPoint, getInteractionPoint, getVisibility, hover, interact, interact, 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, getHighPrecisionPosition, getPosition, getPosition
-
-
-
-
Method Detail
-
setBackupModel
public void setBackupModel(int[] frontBottomLeft, int[] backTopRight)
Description copied from interface:Modeled
Sets a backup model to be used when the model isn't available.- Specified by:
setBackupModel
in interfaceModeled
-
setBackupModel
public void setBackupModel(com.runemate.game.api.hybrid.util.collections.Pair<int[],int[]> values)
Description copied from interface:Modeled
Sets a pair of points to be used to create a backup model when the in-game model isn't available- Specified by:
setBackupModel
in interfaceModeled
-
setBackupModel
public void setBackupModel(Model backup)
- Specified by:
setBackupModel
in interfaceModeled
-
setForcedModel
public void setForcedModel(int[] frontBottomLeft, int[] backTopRight)
Description copied from interface:Modeled
Sets a model to be used regardless of whether the in-game model is available.- Specified by:
setForcedModel
in interfaceModeled
-
setForcedModel
public void setForcedModel(com.runemate.game.api.hybrid.util.collections.Pair<int[],int[]> values)
Description copied from interface:Modeled
Sets a pair of points to be used to create a model regardless of whether the in-game model is available- Specified by:
setForcedModel
in interfaceModeled
-
setForcedModel
public void setForcedModel(Model forced)
- Specified by:
setForcedModel
in interfaceModeled
-
hasDynamicBounds
public boolean hasDynamicBounds()
- Specified by:
hasDynamicBounds
in interfaceInteractable
-
render
public void render(java.awt.Graphics2D g2d)
Description copied from interface:Renderable
Renders this entity onto the givenGraphics2D
, use is discouraged- Specified by:
render
in interfaceRenderable
-
render
public void render(javafx.scene.canvas.GraphicsContext gc)
Description copied from interface:Renderable
Renders this entity onto the givenGraphicsContext
- Specified by:
render
in interfaceRenderable
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
releaseUidOnGarbageCollection
public void releaseUidOnGarbageCollection(boolean release)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
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
- Returns:
- true if it's still available, otherwise false
-
-