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

Method Variables

Minecraft-Utils/1.8.8/src/Variables.java:69–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 new PotionEffectImpl("potion.moveSpeed", 20 * 50, "0:50", 1, 0, true, true, 0x7cafc6));
68
69 public Variables() {
70 eu.the5zig.mod.util.Keyboard.initLegacy(new eu.the5zig.mod.util.Keyboard.KeyboardHandler() {
71 @Override
72 public boolean isKeyDown(int key) {
73 return org.lwjgl.input.Keyboard.isKeyDown(key);
74 }
75
76 @Override
77 public void enableRepeatEvents(boolean repeat) {
78 eu.the5zig.mod.util.Keyboard.enableRepeatEvents(repeat);
79 }
80 });
81 Mouse.init(new Mouse.MouseHandler() {
82 @Override
83 public boolean isButtonDown(int button) {
84 return org.lwjgl.input.Mouse.isButtonDown(button);
85 }
86
87 @Override
88 public int getX() {
89 return org.lwjgl.input.Mouse.getX();
90 }
91
92 @Override
93 public int getY() {
94 return org.lwjgl.input.Mouse.getY();
95 }
96 });
97 Display.init(new Display.DisplayHandler() {
98 @Override
99 public boolean isActive() {
100 return org.lwjgl.opengl.Display.isActive();
101 }
102 });
103 updateScaledResolution();
104 try {
105 this.resourceManager = new ResourceManager(getGameProfile());
106 } catch (Exception e) {
107 throw new RuntimeException(e);
108 }
109 try {
110 Class<?> enumGameSettings = Names.gameOption.load();
111 Method setMaxValue = Transformer.FORGE ? enumGameSettings.getDeclaredMethod("func_148263_a", float.class) : enumGameSettings.getDeclaredMethod("a", float.class);
112 Field gamma = Transformer.FORGE ? enumGameSettings.getDeclaredField("GAMMA") : enumGameSettings.getDeclaredField("d");
113 setMaxValue.invoke(gamma.get(null), 10.0f);
114 Field fov = Transformer.FORGE ? enumGameSettings.getDeclaredField("FOV") : enumGameSettings.getDeclaredField("c");
115 setMaxValue.invoke(fov.get(null), 130f);
116 } catch (Exception e) {
117 MinecraftFactory.getClassProxyCallback().getLogger().warn("Could not patch game settings", e);
118 }
119 if (Utils.getPlatform() == Utils.Platform.WINDOWS) {
120 try {
121 batteryStatus = new Kernel32.SYSTEM_POWER_STATUS();
122 } catch (Throwable ignored) {
123 }
124 }
125 }
126

Callers

nothing calls this directly

Calls 11

initMethod · 0.95
initMethod · 0.95
getGameProfileMethod · 0.95
getClassProxyCallbackMethod · 0.95
getPlatformMethod · 0.95
initLegacyMethod · 0.80
getMethod · 0.65
getLoggerMethod · 0.65
loadMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected