diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-07-01 16:11:31 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-07-01 16:11:31 +0100 |
| commit | 46186569d5cb462f90e59a37dc17a9fad51cfa4a (patch) | |
| tree | 7d0915f21cb4b9d10bb37ae7b6054dfd0f9b1ac5 /src/main/java/darkknight/jewelrycraft/events/KeyBindings.java | |
| parent | b65c980fffb286feb2853245411f5bafb73daf15 (diff) | |
Added a curse tab, added a config to enable/disable extra jewelry info,
plus more!
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/events/KeyBindings.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/events/KeyBindings.java | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java index 948a422..5104426 100644 --- a/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java +++ b/src/main/java/darkknight/jewelrycraft/events/KeyBindings.java @@ -1,35 +1,38 @@ -package darkknight.jewelrycraft.events; - -import net.minecraft.client.settings.KeyBinding; -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; -import darkknight.jewelrycraft.JewelrycraftMod; -import darkknight.jewelrycraft.network.PacketKeyPressEvent; -import darkknight.jewelrycraft.util.Variables; - -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 KeyBindings() - { - ClientRegistry.registerKeyBinding(render); - ClientRegistry.registerKeyBinding(inventory); - } - - /** - * @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)); - } +package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.settings.KeyBinding;
+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;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.util.Variables;
+
+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 |
