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