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

Method Variables

Minecraft-Utils/1.9/src/Variables.java:66–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 new PotionEffectImpl("effect.moveSpeed", 20 * 50, "0:50", 1, 0, true, true, 0x7cafc6));
65
66 public Variables() {
67 updateScaledResolution();
68 try {
69 this.resourceManager = new ResourceManager(getGameProfile());
70 } catch (Exception e) {
71 throw new RuntimeException(e);
72 }
73 try {
74 Class<?> enumGameSettings = Names.gameOption.load();
75 Method setMaxValue = Transformer.FORGE ? enumGameSettings.getDeclaredMethod("func_148263_a", float.class) : enumGameSettings.getDeclaredMethod("a", float.class);
76 Field gamma = Transformer.FORGE ? enumGameSettings.getDeclaredField("GAMMA") : enumGameSettings.getDeclaredField("d");
77 setMaxValue.invoke(gamma.get(null), 10.0f);
78 Field fov = Transformer.FORGE ? enumGameSettings.getDeclaredField("FOV") : enumGameSettings.getDeclaredField("c");
79 setMaxValue.invoke(fov.get(null), 130f);
80 } catch (Exception e) {
81 MinecraftFactory.getClassProxyCallback().getLogger().warn("Could not patch game settings", e);
82 }
83 if (Utils.getPlatform() == Utils.Platform.WINDOWS) {
84 try {
85 batteryStatus = new Kernel32.SYSTEM_POWER_STATUS();
86 } catch (Throwable ignored) {
87 }
88 }
89 }
90
91 @Override
92 public void drawString(String string, int x, int y, Object... format) {

Callers

nothing calls this directly

Calls 8

getGameProfileMethod · 0.95
getClassProxyCallbackMethod · 0.95
getPlatformMethod · 0.95
getMethod · 0.65
getLoggerMethod · 0.65
loadMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected