RuneHive-Game
Loading...
Searching...
No Matches
BuildableMap.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.construction;
2
3import com.runehive.game.world.entity.mob.Direction;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.object.CustomGameObject;
6import com.runehive.game.world.position.Position;
7import com.runehive.util.generic.GenericVoid;
8
9public 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
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
50 return position;
51 }
52}
void face(GameObject object)
Sets the client update flag to face a certain direction.
Definition Mob.java:289
This class represents a character controlled by a player.
Definition Player.java:125
Represents a static game object loaded from the map fs.
void register()
Registers an entity to the World.
Represents a single tile on the game world.
Definition Position.java:14
BuildableMap(String name, int level, int cost, Position position)
Represents the enumerated directions an entity can walk or face.