Package org.rspeer.game.position
Class Position
java.lang.Object
org.rspeer.game.position.Position
- All Implemented Interfaces:
SceneNode
- Direct Known Subclasses:
AbsolutePosition
,RelativePosition
Represents a
Position
relative to the game world-
Nested Class Summary
Nested classes/interfaces inherited from interface org.rspeer.game.adapter.type.SceneNode
SceneNode.Query<Q extends SceneNode.Query<Q>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(int x, int y, int level) boolean
static Position
fromAbsolute
(int x, int y, int level) static Position
fromRelative
(int x, int y, int level) static Position
fromScript
(int regionX, int regionY, int insetX, int insetY, int level) Constructs a Position using jagex's inhouse position system.getChunk()
int
int
int
int
int
int
int
int
int
getX()
int
getY()
int
hashCode()
boolean
boolean
rotate
(int rotation) static Position
rotate
(int x, int y, int level, int rotation) toScene()
toString()
toWorld()
translate
(int x, int y) static Position
unpack
(int packed) boolean
Methods inherited from interface org.rspeer.game.adapter.type.SceneNode
distance, distance, distance, distance, getArea, getEntityPositionHeight, getEntityPositionWidth, isInFieldOfViewOf, isInFieldOfViewOf
-
Constructor Details
-
Position
public Position(int x, int y, int level) -
Position
public Position(int x, int y)
-
-
Method Details
-
fromRelative
-
fromAbsolute
-
fromScript
Constructs a Position using jagex's inhouse position system.- Returns:
- A Position comprised of regionX, regionY, insetX, insetY and floor level.
-
unpack
-
rotate
-
getRegionX
public int getRegionX() -
getRegionY
public int getRegionY() -
getRegionXInset
public int getRegionXInset() -
getRegionYInset
public int getRegionYInset() -
getRegionId
public int getRegionId() -
getChunkX
public int getChunkX() -
getChunkY
public int getChunkY() -
getChunk
-
getChunkOffset
-
getX
public int getX() -
getY
public int getY() -
getFloorLevel
public int getFloorLevel()- Specified by:
getFloorLevel
in interfaceSceneNode
-
translate
-
translate
-
toWorld
-
toScene
-
toPrecise
-
fromInstance
-
getInstancePositions
-
isInstanced
public boolean isInstanced() -
getPosition
- Specified by:
getPosition
in interfaceSceneNode
-
toString
-
equals
public boolean equals(int x, int y, int level) -
equals
-
isInScene
public boolean isInScene() -
rotate
-
within
-
hashCode
public int hashCode()
-