Interface Locatable
- All Superinterfaces:
Validatable
- All Known Subinterfaces:
Actor,GameEntity,GraphicsObject,GroundItem,HintArrow,LocatableEntity,NPC,Player,Projectile,SceneObject
- All Known Implementing Classes:
Tile
An entity that can be located in the world.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanReach(APIContext ctx) Checks whether or not we can reach this entity.default booleancanReach(APIContext ctx, int radius) Checks if a tile within the squared radius can be reached.default booleancanReach(APIContext ctx, Locatable origin) Checks whether or not this entity can be reached from the given entity.default Tilederive(int x, int y) Derives a new tile from the current location.default Tilederive(int x, int y, int plane) Derives a new tile from the current location.default doubledistanceTo(APIContext ctx) Gets the distance to this entity.default doubledistanceTo(APIContext ctx, Locatable other) Gets the distance between this and the given other entity.default AreagetArea()Gets the area occupied by this entity.default AreagetArea(int radius) Gets a rectangular area from the center of this entity with the given radius.Gets the tile that this entity is located on in the world.default PointgetMapPoint(APIContext ctx) Gets the location on the minimap of this entity.intgetPlane()Gets the z-coordinate, also known as the floor or level.Gets the scene offset for this entity.intgetX()Gets the x-coordinate.intgetY()Gets the y-coordinate.default booleanisOnMap(APIContext ctx) Gets if this entity is visible on the (mini)map.default Tilerandomize(int x, int y) Derives a random new tile from the current location.default Tilerandomize(int x, int y, int plane) Derives a random new tile from the current location.default Tilerandomize(int left, int right, int down, int up) Derives a random new tile from the current location.default inttileDistanceTo(APIContext ctx) Gets the tile distance to this entity.default inttileDistanceTo(APIContext ctx, Locatable other) Gets the tile distance between this and the given other entity.Methods inherited from interface com.epicbot.api.shared.entity.details.Validatable
isValid
-
Method Details
-
getX
int getX()Gets the x-coordinate.- Returns:
- int
-
getY
int getY()Gets the y-coordinate.- Returns:
- int
-
getPlane
int getPlane()Gets the z-coordinate, also known as the floor or level.- Returns:
- int
-
getLocation
Tile getLocation()Gets the tile that this entity is located on in the world.- Returns:
Tile
-
getSceneOffset
SceneOffset getSceneOffset()Gets the scene offset for this entity.- Returns:
SceneOffset
-
getArea
Gets the area occupied by this entity.- Returns:
Area
-
getArea
Gets a rectangular area from the center of this entity with the given radius.- Parameters:
radius- the radius- Returns:
Area
-
derive
Derives a new tile from the current location.- Parameters:
x- offset added to x-coordinatey- offset added to y-coordinate- Returns:
- the new derived tile
-
derive
Derives a new tile from the current location.- Parameters:
x- offset added to x-coordinatey- offset added to y-coordinateplane- offset added to z-coordinate- Returns:
- the new derived tile
-
randomize
Derives a random new tile from the current location. For example passing in 3 will generate a number between -3 and 3.- Parameters:
x- random x-offset added to x-coordinatey- random y-offset added to y-coordinate- Returns:
- the new tile
-
randomize
Derives a random new tile from the current location.- Parameters:
left- maximum negative x differenceright- maximum positive x differencedown- maximum negative y differenceup- maximum positive y difference- Returns:
- the new tile
-
randomize
Derives a random new tile from the current location. Passing in 3 will generate a number between -3 and 3, plane is always positive (between 0 and 3).- Parameters:
x- random x-offset added to x-coordinatey- random y-offset added to y-coordinateplane- random plane added to z-coordinate- Returns:
- the new tile
-