MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / MinecraftFactory

Class MinecraftFactory

Mod Utils/src/eu/the5zig/mod/MinecraftFactory.java:6–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import eu.the5zig.mod.util.IVariables;
5
6public class MinecraftFactory {
7
8 private static final IVariables variables;
9 private static ClassProxyCallback classProxyCallback;
10
11 static {
12 try {
13 variables = (IVariables) Class.forName("Variables").newInstance();
14 } catch (Exception e) {
15 throw new RuntimeException(e);
16 }
17 }
18
19 public static IVariables getVars() {
20 return variables;
21 }
22
23 public static void setClassProxyCallback(ClassProxyCallback classProxyCallback) {
24 MinecraftFactory.classProxyCallback = classProxyCallback;
25 }
26
27 public static ClassProxyCallback getClassProxyCallback() {
28 return classProxyCallback;
29 }
30
31}

Callers

nothing calls this directly

Calls 2

forNameMethod · 0.80
newInstanceMethod · 0.45

Tested by

no test coverage detected