From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../jewelrycraft/events/KeyBindings.java | 58 ++++++++++++---------- 1 file changed, 32 insertions(+), 26 deletions(-) mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/events/KeyBindings.java (limited to 'src/main/java/darkknight/jewelrycraft/events/KeyBindings.java') diff --git a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java old mode 100644 new mode 100755 index 3e4a2c3..c7f5bef --- a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java +++ b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java @@ -1,6 +1,7 @@ package darkknight.jewelrycraft.events; import org.lwjgl.input.Keyboard; + import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent; @@ -9,30 +10,35 @@ import darkknight.jewelrycraft.network.PacketKeyPressEvent; import darkknight.jewelrycraft.util.Variables; import net.minecraft.client.settings.KeyBinding; -public class KeyBindings -{ - public static KeyBinding render = new KeyBinding("Pretty Render", Keyboard.KEY_Z, Variables.MODNAME); - public static KeyBinding inventory = new KeyBinding("Jewelry Inventory", Keyboard.KEY_J, Variables.MODNAME); - public static KeyBinding curses = new KeyBinding("Curses Tab", Keyboard.KEY_C, Variables.MODNAME); - - /** - * - */ - public KeyBindings() - { - ClientRegistry.registerKeyBinding(render); - ClientRegistry.registerKeyBinding(inventory); - ClientRegistry.registerKeyBinding(curses); - } - - /** - * @param event - */ - @SubscribeEvent - public void onKeyInput(InputEvent.KeyInputEvent event) - { - if (render.isPressed()) JewelrycraftMod.fancyRender = !JewelrycraftMod.fancyRender; - if (inventory.isPressed()) JewelrycraftMod.netWrapper.sendToServer(new PacketKeyPressEvent(0)); - if (curses.isPressed()) JewelrycraftMod.netWrapper.sendToServer(new PacketKeyPressEvent(1)); - } +public class KeyBindings { + public static KeyBinding render = new KeyBinding( + "Pretty Render", Keyboard.KEY_Z, Variables.MODNAME); + public static KeyBinding inventory = new KeyBinding( + "Jewelry Inventory", Keyboard.KEY_J, Variables.MODNAME); + public static KeyBinding curses = new KeyBinding("Curses Tab", + Keyboard.KEY_C, Variables.MODNAME); + + /** + * + */ + public KeyBindings() { + ClientRegistry.registerKeyBinding(render); + ClientRegistry.registerKeyBinding(inventory); + ClientRegistry.registerKeyBinding(curses); + } + + /** + * @param event + */ + @SubscribeEvent + public void onKeyInput(InputEvent.KeyInputEvent event) { + if (render.isPressed()) + JewelrycraftMod.fancyRender = !JewelrycraftMod.fancyRender; + if (inventory.isPressed()) + JewelrycraftMod.netWrapper + .sendToServer(new PacketKeyPressEvent(0)); + if (curses.isPressed()) + JewelrycraftMod.netWrapper + .sendToServer(new PacketKeyPressEvent(1)); + } } \ No newline at end of file -- cgit v1.2.3