RuneHive-Game
Loading...
Searching...
No Matches
GrimyHerb.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.herblore;
2
3import com.runehive.game.world.items.Item;
4
5import java.util.Arrays;
6import java.util.Optional;
7
8/**
9 * Holds all the grimy herb data.
10 *
11 * @author Daniel
12 * @author Michael | Chex
13 */
14public enum GrimyHerb {
15 GUAM(199, 249, 1, 2.5),
16 MARRENTILL(201, 251, 5, 3.8),
17 TARROMIN(203, 253, 11, 5),
18 HARRALANDER(205, 255, 20, 6.3),
19 RANARR(207, 257, 25, 7.5),
20 TOADFLAX(3049, 2998, 30, 8),
21 SPIRITWEED(12174, 12172, 35, 8),
22 IRIT(209, 259, 40, 8.8),
23 WERGALI(14836, 14854, 30, 8),
24 AVANTOE(211, 261, 48, 10),
25 KWUARM(213, 263, 54, 11.3),
26 SNAPDRAGON(3051, 3000, 59, 11.8),
27 CADANTINE(215, 265, 65, 12.5),
28 LANTADYME(2485, 2481, 67, 13.1),
29 DWARFWEED(217, 267, 70, 13.8),
30 TORSTOL(219, 269, 75, 15);
31
32 /**
33 * The grimy herb.
34 */
35 public final int grimy;
36
37
38 /**
39 * The clean herb.
40 */
41 public final int clean;
42
43 /**
44 * The level to clean the herb.
45 */
46 public final int level;
47
48 /**
49 * The experience for cleaning the herb.
50 */
51 public final double experience;
52
53 /**
54 * The grimy herb data.
55 *
56 * @param grimy The grimy herb.
57 * @param clean The clean herb.
58 * @param level The level required to clean the herb.
59 * @param experience The experience given for cleaning the herb.
60 */
61 GrimyHerb(int grimy, int clean, int level, double experience) {
62 this.grimy = grimy;
63 this.clean = clean;
64 this.level = level;
65 this.experience = experience;
66 }
67
68 /**
69 * Gets the grimy herb.
70 *
71 * @return The grimy herb.
72 */
73 public Item getGrimy() {
74 return new Item(grimy);
75 }
76
77 /**
78 * Gets the clean herb.
79 *
80 * @return The clean herb.
81 */
82 public Item getClean() {
83 return new Item(clean);
84 }
85
86 /**
87 * Gets the experience for cleaning a herb.
88 *
89 * @return The experience.
90 */
91 public double getExperience() {
92 return experience;
93 }
94
95 /**
96 * Gets the level to clean the herb.
97 *
98 * @return The level required.
99 */
100 public int getLevel() {
101 return level;
102 }
103
104 /**
105 * Gets the herb data from the item identification.
106 *
107 * @param id The item identification.
108 * @return The grimy herb data.
109 */
110 public static Optional<GrimyHerb> forId(int id) {
111 return Arrays.stream(values()).filter(a -> a.grimy == id).findAny();
112 }
113
114 public int getGrimyID() {
115 return grimy;
116 }
117 public int getCleanID() {
118 return clean;
119 }
120}
The container class that represents an item that can be interacted with.
Definition Item.java:21
GrimyHerb(int grimy, int clean, int level, double experience)
The grimy herb data.
double getExperience()
Gets the experience for cleaning a herb.
int getLevel()
Gets the level to clean the herb.
final double experience
The experience for cleaning the herb.
final int level
The level to clean the herb.
static Optional< GrimyHerb > forId(int id)
Gets the herb data from the item identification.