Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package aJamigaPack1;
- import net.minecraft.client.settings.KeyBinding;
- import org.lwjgl.input.Keyboard;
- import cpw.mods.fml.client.registry.KeyBindingRegistry;
- public class RegisterKeyBindings
- {
- /** Key index for easy handling */
- public static final int CUSTOM_INV = 0;
- /** Key descriptions */
- private static final String[] desc = {"Custom Inventory"};
- /** Default key values */
- private static final int[] keyValues = {Keyboard.KEY_O};
- /** This stores all of our key bindings and is always updated with the in-game settings */
- public static final KeyBinding[] keys = new KeyBinding[desc.length];
- /** This initializes and registers all the key bindings */
- public static void init()
- {
- boolean[] repeat = new boolean[desc.length];
- // just use a for loop to run through all the values
- for (int i = 0; i < desc.length; ++i) {
- keys[i] = new KeyBinding(desc[i], keyValues[i]);
- repeat[i] = false;
- }
- KeyBindingRegistry.registerKeyBinding(new TutKeyHandler(keys, repeat));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement