|
RuneHive-Game
|
Represents a single region. More...
Public Member Functions | |
| Set< GroundItem > | getGroundItems (Position position) |
Gets a Set of GroundItems. | |
| Collection< Npc > | getNpcs () |
| Collection< Player > | getPlayers () |
Package Functions | |
| void | addGroundItem (GroundItem item) |
| Adds a ground item to this block. | |
| void | addNpc (Npc npc) |
| Adds an npc to this block. | |
| void | addObject (GameObject object) |
| Adds an object to this block. | |
| void | addPlayer (Player player) |
| Adds a player to this block. | |
| boolean | containsNpc (Npc npc) |
| boolean | containsObject (GameObject object) |
| boolean | containsObject (Position position) |
| boolean | containsPlayer (Player player) |
| GameObject | getCustomObject (int id, Position position) |
| int | getFlags (int x, int y) |
| Gets a single tile in this region from the specified height, x and y coordinates. | |
| GameObject | getGameObject (int id, Position position) |
| List< GameObject > | getGameObjects (Position position) |
| GroundItem | getGroundItem (int id, Position position) |
The method that retrieves the item with id on position. | |
| void | removeGroundItem (GroundItem item) |
| Adds a ground item to this block. | |
| void | removeNpc (Npc npc) |
| Removes an npc from this block. | |
| void | removeObject (GameObject object) |
| Removes an object from this block. | |
| void | removePlayer (Player player) |
| Removes a player from this block. | |
| void | sendGameObjects (Player player) |
| void | sendGroundItems (Player player) |
The method which handles updating when the specified player enters a new region. | |
| void | setFlags (int x, int y, int flag) |
| Gets a single tile in this region from the specified height, x and y coordinates. | |
| void | skip (GameObject gameObject) |
| void | unsetFlags (int x, int y, int flag) |
| Gets a single tile in this region from the specified height, x and y coordinates. | |
Private Member Functions | |
| Map< Position, Set< GroundItem > > | getGroundItems () |
| Map< Position, List< GameObject > > | getObjects () |
| Deque< GameObject > | getRemovedObjects () |
Private Attributes | |
| int[] | flags |
| The clipping flags within the region. | |
| Map< Position, Set< GroundItem > > | groundItems |
| A list of ground items in this region. | |
| Deque< Npc > | npcs = new ConcurrentLinkedDeque<>() |
| A list of npcs in this region. | |
| Map< Position, List< GameObject > > | objects |
| A list of objects in this region. | |
| Deque< Player > | players = new ConcurrentLinkedDeque<>() |
| A list of players in this region. | |
| Deque< GameObject > | skipped |
| A list of removed objects in this region. | |
Represents a single region.
Definition at line 24 of file RegionBlock.java.
|
package |
Adds a ground item to this block.
Definition at line 117 of file RegionBlock.java.
References getGroundItems(), com.runehive.game.world.entity.Entity.getPosition(), and com.runehive.game.world.entity.Entity.setIndex().
Referenced by com.runehive.game.world.region.Region.addGroundItem().
|
package |
Adds an npc to this block.
Definition at line 93 of file RegionBlock.java.
References npcs.
Referenced by com.runehive.game.world.region.Region.addNpc().
|
package |
Adds an object to this block.
Definition at line 103 of file RegionBlock.java.
References getObjects().
Referenced by com.runehive.game.world.region.Region.addObject().
|
package |
Adds a player to this block.
Definition at line 83 of file RegionBlock.java.
References players.
Referenced by com.runehive.game.world.region.Region.addPlayer().
|
package |
true if this region contains this npc Definition at line 142 of file RegionBlock.java.
References npcs.
Referenced by com.runehive.game.world.region.Region.containsNpc().
|
package |
true if object is in region Definition at line 152 of file RegionBlock.java.
References getObjects().
Referenced by com.runehive.game.world.region.Region.containsObject(), and com.runehive.game.world.region.Region.containsObject().
|
package |
true if position is occupied by object Definition at line 158 of file RegionBlock.java.
References getObjects().
|
package |
true if this region contains this player Definition at line 147 of file RegionBlock.java.
References players.
Referenced by com.runehive.game.world.region.Region.containsPlayer().
|
package |
Definition at line 172 of file RegionBlock.java.
References com.runehive.game.world.object.GameObject.getId(), getObjects(), and com.runehive.game.world.entity.Entity.isValid().
Referenced by com.runehive.game.world.region.Region.getCustomObject().
|
package |
Gets a single tile in this region from the specified height, x and y coordinates.
| x | The x coordinate. |
| y | The y coordinate. |
Definition at line 254 of file RegionBlock.java.
References flags.
Referenced by com.runehive.game.world.region.Region.getFlags().
|
package |
Definition at line 163 of file RegionBlock.java.
References getGameObjects().
Referenced by com.runehive.game.world.region.Region.getGameObject().
|
package |
Definition at line 189 of file RegionBlock.java.
References getObjects().
Referenced by getGameObject(), and com.runehive.game.world.region.Region.getObjects().
|
package |
The method that retrieves the item with id on position.
| id | the identifier to retrieve the item with. |
| position | the position to retrieve the item on. |
Definition at line 73 of file RegionBlock.java.
References getGroundItems().
Referenced by com.runehive.game.world.region.Region.getGroundItem().
|
private |
Definition at line 228 of file RegionBlock.java.
References groundItems.
Referenced by addGroundItem(), getGroundItem(), getGroundItems(), and removeGroundItem().
| Set< GroundItem > com.runehive.game.world.region.RegionBlock.getGroundItems | ( | Position | position | ) |
Gets a Set of GroundItems.
If none then creating the set.
| position | the position to grab from. |
Definition at line 61 of file RegionBlock.java.
References getGroundItems().
Referenced by com.runehive.game.world.region.Region.getGroundItems(), and sendGroundItems().
| Collection< Npc > com.runehive.game.world.region.RegionBlock.getNpcs | ( | ) |
Definition at line 50 of file RegionBlock.java.
References npcs.
Referenced by com.runehive.game.world.region.Region.getNpcs().
|
private |
Definition at line 234 of file RegionBlock.java.
References objects.
Referenced by addObject(), containsObject(), containsObject(), getCustomObject(), getGameObjects(), removeObject(), and sendGameObjects().
| Collection< Player > com.runehive.game.world.region.RegionBlock.getPlayers | ( | ) |
Definition at line 45 of file RegionBlock.java.
References players.
Referenced by com.runehive.game.world.region.Region.getPlayers().
|
private |
Definition at line 240 of file RegionBlock.java.
References skipped.
Referenced by sendGameObjects(), and skip().
|
package |
Adds a ground item to this block.
Definition at line 131 of file RegionBlock.java.
References getGroundItems(), and com.runehive.game.world.entity.Entity.getPosition().
Referenced by com.runehive.game.world.region.Region.removeGroundItem().
|
package |
Removes an npc from this block.
Definition at line 98 of file RegionBlock.java.
References npcs.
Referenced by com.runehive.game.world.region.Region.removeNpc().
|
package |
Removes an object from this block.
Definition at line 110 of file RegionBlock.java.
References getObjects().
Referenced by com.runehive.game.world.region.Region.removeObject().
|
package |
Removes a player from this block.
Definition at line 88 of file RegionBlock.java.
References players.
Referenced by com.runehive.game.world.region.Region.removePlayer().
|
package |
Definition at line 193 of file RegionBlock.java.
References getObjects(), getRemovedObjects(), com.runehive.game.world.entity.Entity.isValid(), and com.runehive.game.world.entity.mob.player.Player.send().
Referenced by com.runehive.game.world.region.Region.sendGameObjects().
|
package |
The method which handles updating when the specified player enters a new region.
Definition at line 214 of file RegionBlock.java.
References getGroundItems(), and com.runehive.game.world.entity.mob.player.Player.send().
Referenced by com.runehive.game.world.region.Region.sendGroundItems().
|
package |
Gets a single tile in this region from the specified height, x and y coordinates.
| x | The x coordinate. |
| y | The y coordinate. |
Definition at line 268 of file RegionBlock.java.
References flags.
Referenced by com.runehive.game.world.region.Region.setFlags().
|
package |
Definition at line 288 of file RegionBlock.java.
References getRemovedObjects().
Referenced by com.runehive.game.world.region.Region.skip().
|
package |
Gets a single tile in this region from the specified height, x and y coordinates.
| x | The x coordinate. |
| y | The y coordinate. |
Definition at line 282 of file RegionBlock.java.
References flags.
Referenced by com.runehive.game.world.region.Region.unsetFlags().
|
private |
The clipping flags within the region.
Definition at line 27 of file RegionBlock.java.
Referenced by getFlags(), setFlags(), and unsetFlags().
|
private |
A list of ground items in this region.
Definition at line 42 of file RegionBlock.java.
Referenced by getGroundItems().
|
private |
A list of npcs in this region.
Definition at line 33 of file RegionBlock.java.
Referenced by addNpc(), containsNpc(), getNpcs(), and removeNpc().
|
private |
A list of objects in this region.
Definition at line 36 of file RegionBlock.java.
Referenced by getObjects().
|
private |
A list of players in this region.
Definition at line 30 of file RegionBlock.java.
Referenced by addPlayer(), containsPlayer(), getPlayers(), and removePlayer().
|
private |
A list of removed objects in this region.
Definition at line 39 of file RegionBlock.java.
Referenced by getRemovedObjects().