RuneHive-Game
Loading...
Searching...
No Matches
RunecraftData.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.runecrafting;
2
3import java.util.Arrays;
4import java.util.Optional;
5
6/** Holds the runecrafting data - @author Daniel */
7public enum RunecraftData {
8 AIR(34760, 556, 6.0D, new int[] { 1, 11, 22, 33, 44, 55, 66, 77, 88, 99 }),
9 MIND(34761, 558, 6.5D, new int[] { 1, 14, 28, 42, 56, 70, 84, 98 }),
10 WATER(34762, 555, 7.0D, new int[] { 5, 19, 38, 57, 76, 95 }),
11 EARTH(34763, 557, 7.5D, new int[] { 9, 26, 52, 78 }),
12 FIRE(34764, 554, 8.0D, new int[] { 14, 35, 70 }),
13 BODY(34765, 559, 8.5D, new int[] { 20, 46, 92 }),
14 COSMIC(34766, 564, 10.0D, new int[] { 27, 59 }),
15 CHAOS(34769, 562, 10.5D, new int[] { 35, 74 }),
16 NATURE(34768, 561, 11.0D, new int[] { 44, 91 }),
17 LAW(34767, 563, 10.5D, new int[] { 54 }),
18 DEATH(34770, 560, 12.0D, new int[] { 65 }),
19 BLOOD(27978, 565, 12.5D, new int[] { 77 }),
20 ASTRAL(34771, 9075, 21.5D, new int[] { 82 }),
21 SOUL(27980, 566, 29.7, new int[] { 90 }),
22 WARTH(34772, 21880, 52.5D, new int[] { 95 }),
23 OURNIA(29631, -1, -1, new int[] { 55 });
24
25 /** The object identification. */
26 private final int object;
27
28 /** The runes obtained. */
29 private final int runes;
30
31 /** The experience rewarded. */
32 private final double experience;
33
34 /** The multiplier. */
35 private final int[] multiplier;
36
37 /** The runecrafting data. */
38 RunecraftData(int object, int runes, double experience, int[] multiplier) {
39 this.object = object;
40 this.runes = runes;
41 this.experience = experience;
42 this.multiplier = multiplier;
43 }
44
45 /** Gets the object identification. */
46 public int getObject() {
47 return object;
48 }
49
50 /** Gets the level required. */
51 public int getLevel() {
52 return multiplier[0];
53 }
54
55 /** Gets the multiplier. */
56 public int[] getMultiplier() {
57 return multiplier;
58 }
59
60 /** Gets the runes obtained. */
61 public int getRunes() {
62 return runes;
63 }
64
65 /** Gets the experience rewarded. */
66 public double getExperience() {
67 return experience;
68 }
69
70 /** Gets the runecrafting data based on the object. */
71 public static Optional<RunecraftData> forId(int id) {
72 return Arrays.stream(values()).filter(a -> a.object == id).findAny();
73 }
74}
double getExperience()
Gets the experience rewarded.
static Optional< RunecraftData > forId(int id)
Gets the runecrafting data based on the object.
RunecraftData(int object, int runes, double experience, int[] multiplier)
The runecrafting data.