RuneHive-Game
Loading...
Searching...
No Matches
RunecraftTeleport.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.runecrafting;
2
3import com.runehive.game.world.position.Position;
4
5import java.util.Arrays;
6import java.util.Optional;
7
8/** Holds the runecrafting teleport data - @author Daniel */
9public enum RunecraftTeleport {
10 WATER(25376, new Position(2722, 4830)),
11 CHAOS(24976, new Position(2281, 4837)),
12 LAW(25034, new Position(2464, 4818)),
13 DEATH(25035, new Position(2208, 4830)),
14 SOUL(25377, new Position(1815, 3859)),
15 AIR(25378, new Position(2841, 4829)),
16 MIND(25379, new Position(2793, 4828)),
17 EARTH(24972, new Position(2655, 4830)),
18 FIRE(24971, new Position(2577, 4846)),
19 BLOOD(43848, new Position(1732, 3827)),
20 COSMIC(24974, new Position(2146, 4833)),
21 NATURE(24975, new Position(2400, 4835)),
22 BODY(24973, new Position(2521, 4834));
23
24 /** The object identification. */
25 private final int object;
26
27 /** The teleport position. */
28 private final Position position;
29
30 /** The runecrafting teleport. */
32 this.object = object;
33 this.position = position;
34 }
35
36 /** Gets the object identification. */
37 public int getObject() {
38 return object;
39 }
40
41 /** Gets the teleport position. */
43 return position;
44 }
45
46 /** Gets the runecrafting teleport data based on the object identification. */
47 public static Optional<RunecraftTeleport> forId(int id) {
48 return Arrays.stream(values()).filter(a -> a.object == id).findAny();
49 }
50}
Represents a single tile on the game world.
Definition Position.java:14
static Optional< RunecraftTeleport > forId(int id)
Gets the runecrafting teleport data based on the object identification.
RunecraftTeleport(int object, Position position)
The runecrafting teleport.