/
Internal.java
60 lines (46 loc) · 1.3 KB
/
Internal.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package mezz.jei;
import javax.annotation.Nonnull;
import mezz.jei.util.StackHelper;
import mezz.jei.util.color.ColorNamer;
/** For JEI internal use only, these are normally accessed from the API. */
public class Internal {
@Nonnull
private static JeiHelpers helpers = new JeiHelpers();
private static JeiRuntime runtime;
private static ItemRegistry itemRegistry;
private static ColorNamer colorNamer;
private Internal() {
}
@Nonnull
public static JeiHelpers getHelpers() {
return helpers;
}
public static void setHelpers(@Nonnull JeiHelpers helpers) {
Internal.helpers = helpers;
}
@Nonnull
public static StackHelper getStackHelper() {
return helpers.getStackHelper();
}
public static JeiRuntime getRuntime() {
return runtime;
}
public static void setRuntime(JeiRuntime runtime) {
if (Internal.runtime != null) {
Internal.runtime.close();
}
Internal.runtime = runtime;
}
public static ItemRegistry getItemRegistry() {
return itemRegistry;
}
public static void setItemRegistry(ItemRegistry itemRegistry) {
Internal.itemRegistry = itemRegistry;
}
public static ColorNamer getColorNamer() {
return colorNamer;
}
public static void setColorNamer(ColorNamer colorNamer) {
Internal.colorNamer = colorNamer;
}
}