RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
PrestigePerk.java
1package com.osroyale.content.prestige;
2
3import com.google.common.collect.ImmutableMap;
4
5import java.util.HashMap;
6import java.util.Map;
7
37
38public enum PrestigePerk {
39 ARROWHEAD("Arrowhead", "Using arrows will not break.", 6798),
40 MASTERBAIRTER("Masterbaiter", "15% chance of catching extra fish.", 6799),
41 DOUBLE_WOOD("Double wood", "15% chance to receive an additional log.", 6800),
42 LITTLE_BIRDY("Little Birdy", "Increase the woodcutting rate of bird nest drops by 15%.", 6801),
43 THE_ROCK("The Rock", "10% chance to receive an additional ore.", 6802),
44 FLAME_ON("Flame On", "25% chance of burning an extra log.", 6803);
45
46 public static final PrestigePerk[] values = values();
47 private static final Map<Integer, PrestigePerk> perkItemMap;
48 private static final Map<Integer, PrestigePerk> perkIdMap;
49
50 static {
51 final Map<Integer, PrestigePerk> itemMap = new HashMap<>();
52 final Map<Integer, PrestigePerk> idMap = new HashMap<>();
53 for (PrestigePerk p : values) {
54 itemMap.put(p.item, p);
55 idMap.put(p.ordinal(), p);
56 }
57
58 perkItemMap = ImmutableMap.copyOf(itemMap);
59 perkIdMap = ImmutableMap.copyOf(idMap);
60 }
61
65 public final String name;
66
70 public final String description;
71
75 public final int item;
76
80 PrestigePerk(String name, String description, int item) {
81 this.name = name;
82 this.description = description;
83 this.item = item;
84 }
85
86 public static PrestigePerk forItem(int item) {
87 return perkItemMap.get(item);
88 }
89
90 public static PrestigePerk forId(int id) {
91 return perkIdMap.get(id);
92 }
93}
PrestigePerk(String name, String description, int item)