RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.game.world.region.Region Class Reference

Public Member Functions

 Region (int x, int y)
int getX ()
int getY ()
int getFlags (int height, int x, int y)
void setFlags (int height, int x, int y, int flags)
void unsetFlags (int height, int x, int y, int flags)
Collection< PlayergetPlayers (int height)
Collection< NpcgetNpcs (int height)
GroundItem getGroundItem (int id, Position position)
void addPlayer (Player player)
void removePlayer (Player player)
void addNpc (Npc npc)
void removeNpc (Npc npc)
void addObject (GameObject object)
void removeObject (GameObject object)
void addGroundItem (GroundItem item)
void removeGroundItem (GroundItem item)
boolean containsObject (int height, GameObject object)
boolean containsObject (Position position)
Set< GroundItemgetGroundItems (Position position)
GameObject getGameObject (int id, Position position)
void sendGroundItems (Player player)
void sendGameObjects (Player player)
boolean contains (Position position)
boolean contains (int x, int y)

Detailed Description

Represents a single region.

Author
Graham Edgecombe

Definition at line 58 of file Region.java.

Constructor & Destructor Documentation

◆ Region()

com.osroyale.game.world.region.Region.Region ( int x,
int y )
inline

Creates a region.

Definition at line 78 of file Region.java.

Member Function Documentation

◆ addGroundItem()

void com.osroyale.game.world.region.Region.addGroundItem ( GroundItem item)
inline

Adds a ground item to this region.

Definition at line 187 of file Region.java.

◆ addNpc()

void com.osroyale.game.world.region.Region.addNpc ( Npc npc)
inline

Adds an npc to this region.

Definition at line 167 of file Region.java.

◆ addObject()

void com.osroyale.game.world.region.Region.addObject ( GameObject object)
inline

Adds an object to this region.

Definition at line 177 of file Region.java.

◆ addPlayer()

void com.osroyale.game.world.region.Region.addPlayer ( Player player)
inline

Adds a player to this region.

Definition at line 157 of file Region.java.

◆ contains() [1/2]

boolean com.osroyale.game.world.region.Region.contains ( int x,
int y )
inline
Returns
true if the region contains the position

Definition at line 248 of file Region.java.

◆ contains() [2/2]

boolean com.osroyale.game.world.region.Region.contains ( Position position)
inline
Returns
true if the region contains the position

Definition at line 243 of file Region.java.

◆ containsObject() [1/2]

boolean com.osroyale.game.world.region.Region.containsObject ( int height,
GameObject object )
inline
Returns
true if object is in region

Definition at line 205 of file Region.java.

◆ containsObject() [2/2]

boolean com.osroyale.game.world.region.Region.containsObject ( Position position)
inline
Returns
true if object occupies position

Definition at line 210 of file Region.java.

◆ getFlags()

int com.osroyale.game.world.region.Region.getFlags ( int height,
int x,
int y )
inline

Gets a single tile in this region from the specified height, x and y coordinates.

Parameters
heightThe height.
xThe x coordinate.
yThe y coordinate.
Returns
The tile in this region for the specified attributes.

Definition at line 103 of file Region.java.

◆ getGameObject()

GameObject com.osroyale.game.world.region.Region.getGameObject ( int id,
Position position )
inline
Returns
true if object with given id occupies position

Definition at line 220 of file Region.java.

◆ getGroundItem()

GroundItem com.osroyale.game.world.region.Region.getGroundItem ( int id,
Position position )
inline
Returns
the ground item with the given id at the given position

Definition at line 152 of file Region.java.

◆ getGroundItems()

Set< GroundItem > com.osroyale.game.world.region.Region.getGroundItems ( Position position)
inline
Returns
a set of ground items on the position

Definition at line 215 of file Region.java.

◆ getNpcs()

Collection< Npc > com.osroyale.game.world.region.Region.getNpcs ( int height)
inline
Returns
the npcs in this region

Definition at line 147 of file Region.java.

◆ getPlayers()

Collection< Player > com.osroyale.game.world.region.Region.getPlayers ( int height)
inline
Returns
the players in this region

Definition at line 142 of file Region.java.

◆ getX()

int com.osroyale.game.world.region.Region.getX ( )
inline
Returns
region x-coordinate

Definition at line 85 of file Region.java.

◆ getY()

int com.osroyale.game.world.region.Region.getY ( )
inline
Returns
region y-coordinate

Definition at line 90 of file Region.java.

◆ removeGroundItem()

void com.osroyale.game.world.region.Region.removeGroundItem ( GroundItem item)
inline

Adds a ground item to this region.

Definition at line 192 of file Region.java.

◆ removeNpc()

void com.osroyale.game.world.region.Region.removeNpc ( Npc npc)
inline

Removes an npc from this region.

Definition at line 172 of file Region.java.

◆ removeObject()

void com.osroyale.game.world.region.Region.removeObject ( GameObject object)
inline

Removes an object from this region.

Definition at line 182 of file Region.java.

◆ removePlayer()

void com.osroyale.game.world.region.Region.removePlayer ( Player player)
inline

Removes a player from this region.

Definition at line 162 of file Region.java.

◆ sendGameObjects()

void com.osroyale.game.world.region.Region.sendGameObjects ( Player player)
inline

Sends game objects in this region to the player.

Definition at line 238 of file Region.java.

◆ sendGroundItems()

void com.osroyale.game.world.region.Region.sendGroundItems ( Player player)
inline

Sends ground items in this region to the player.

Definition at line 233 of file Region.java.

◆ setFlags()

void com.osroyale.game.world.region.Region.setFlags ( int height,
int x,
int y,
int flags )
inline

Gets a single tile in this region from the specified height, x and y coordinates.

Parameters
heightThe height.
xThe x coordinate.
yThe y coordinate.
Returns
The tile in this region for the specified attributes.

Definition at line 116 of file Region.java.

◆ unsetFlags()

void com.osroyale.game.world.region.Region.unsetFlags ( int height,
int x,
int y,
int flags )
inline

Gets a single tile in this region from the specified height, x and y coordinates.

Parameters
heightThe height.
xThe x coordinate.
yThe y coordinate.
Returns
The tile in this region for the specified attributes.

Definition at line 129 of file Region.java.


The documentation for this class was generated from the following file: