RuneHive-Game
Loading...
Searching...
No Matches
BuildableMap.java
Go to the documentation of this file.
1
package
com.runehive.content.skill.impl.construction;
2
3
import
com.runehive.game.world.entity.mob.Direction;
4
import
com.runehive.game.world.entity.mob.player.Player;
5
import
com.runehive.game.world.object.CustomGameObject;
6
import
com.runehive.game.world.position.Position;
7
import
com.runehive.util.generic.GenericVoid;
8
9
public
enum
BuildableMap
implements
GenericVoid<Player>
{
10
SMALL_CAVE
(
"Small cave"
, 0, 0,
new
Position
(3305, 9833)) {
11
@Override
12
public
void
execute
(
Player
player) {
13
player.
face
(
Direction
.
SOUTH
);
14
new
CustomGameObject
(4525,
new
Position
(3305, 9832, player.
house
.
getHeight
())).
register
();
//Portal
15
}
16
},
17
THRONE_ROOM(
"Throne room"
, 90, 15_000000,
new
Position
(2036, 4538)) {
18
@Override
19
public
void
execute(
Player
player) {
20
player.
face
(
Direction
.
SOUTH
);
21
new
CustomGameObject
(4525,
new
Position
(2036, 4539, player.
house
.
getHeight
())).
register
();
//Portal
22
}
23
};
24
25
private
final
String
name
;
26
private
final
int
level
;
27
private
final
int
cost
;
28
private
final
Position
position
;
29
30
BuildableMap
(String
name
,
int
level
,
int
cost
,
Position
position
) {
31
this.name =
name
;
32
this.level =
level
;
33
this.cost =
cost
;
34
this.position =
position
;
35
}
36
37
public
String
getName
() {
38
return
name
;
39
}
40
41
public
int
getLevel
() {
42
return
level
;
43
}
44
45
public
int
getCost
() {
46
return
cost
;
47
}
48
49
public
Position
getPosition
() {
50
return
position
;
51
}
52
}
com.runehive.content.skill.impl.construction.House.getHeight
int getHeight()
Definition
House.java:254
com.runehive.game.world.entity.mob.Mob.face
void face(GameObject object)
Sets the client update flag to face a certain direction.
Definition
Mob.java:289
com.runehive.game.world.entity.mob.player.Player
This class represents a character controlled by a player.
Definition
Player.java:125
com.runehive.game.world.entity.mob.player.Player.house
final House house
Definition
Player.java:342
com.runehive.game.world.object.CustomGameObject
Represents a static game object loaded from the map fs.
Definition
CustomGameObject.java:25
com.runehive.game.world.object.CustomGameObject.register
void register()
Registers an entity to the World.
Definition
CustomGameObject.java:108
com.runehive.game.world.position.Position
Represents a single tile on the game world.
Definition
Position.java:14
com.runehive.content.skill.impl.construction.BuildableMap.name
final String name
Definition
BuildableMap.java:25
com.runehive.content.skill.impl.construction.BuildableMap.getName
String getName()
Definition
BuildableMap.java:37
com.runehive.content.skill.impl.construction.BuildableMap.getPosition
Position getPosition()
Definition
BuildableMap.java:49
com.runehive.content.skill.impl.construction.BuildableMap.BuildableMap
BuildableMap(String name, int level, int cost, Position position)
Definition
BuildableMap.java:30
com.runehive.content.skill.impl.construction.BuildableMap.cost
final int cost
Definition
BuildableMap.java:27
com.runehive.content.skill.impl.construction.BuildableMap.getLevel
int getLevel()
Definition
BuildableMap.java:41
com.runehive.content.skill.impl.construction.BuildableMap.position
final Position position
Definition
BuildableMap.java:28
com.runehive.content.skill.impl.construction.BuildableMap.getCost
int getCost()
Definition
BuildableMap.java:45
com.runehive.content.skill.impl.construction.BuildableMap.SMALL_CAVE
SMALL_CAVE
Definition
BuildableMap.java:10
com.runehive.content.skill.impl.construction.BuildableMap.level
final int level
Definition
BuildableMap.java:26
com.runehive.game.world.entity.mob.Direction
Represents the enumerated directions an entity can walk or face.
Definition
Direction.java:12
com.runehive.game.world.entity.mob.Direction.SOUTH
SOUTH
Definition
Direction.java:17
com.runehive.util.generic.GenericVoid
Definition
GenericVoid.java:3
com.runehive.util.generic.GenericVoid.execute
void execute(final T player)