Posted January 28, 201312 yr Hello All, I'm new to keybinds and can't find a tutorial for them anywhere, I figured out how to register a new KeyHandler and have created this class (Haven't edited any of the contents yet as I'm not sure what to do). This is the class Eclipse made for me: package yagoki.mods.weapons; import java.util.EnumSet; import net.minecraft.client.settings.KeyBinding; import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler; import cpw.mods.fml.common.TickType; public class KeyBindingHandler extends KeyHandler { public KeyBindingHandler(KeyBinding[] keyBindings) { super(keyBindings); } @Override public String getLabel() { return null; } @Override public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { } @Override public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) { } @Override public EnumSet<TickType> ticks() { return null; } } What do I need to change in here so I can code the double jump (I guess this is done in the key down or key up section) Thanks in advance github
January 28, 201312 yr In my common proxy I put this public void registerKeyBindingHandler() { KeyBinding[] keybind = new KeyBinding[]{}; KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler(keybind)); } I'm not sure if what i did is correct though. And in my main mod class, in the init function I put proxy.registerKeyBindingHandler(); That's all I figured out so far. I'm new to keybinds as well.
January 28, 201312 yr Author i already got this far, just not sure how to use it to detect the double jump, which is the part i'm not sure on. Thanks anyway github
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.