Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import net.minecraft.client.Minecraft;
- public class mod_KeybindTest extends BaseMod {
- public KeyBinding key_test = new KeyBinding("key_test", 36);
- public mod_KeybindTest()
- {
- ModLoader.RegisterKey(this, this.key_test, false);
- ModLoader.AddLocalization("key_test", "Test");
- System.out.println("KeyBindings Loaded -Hopefully-");
- }
- public void KeyboardEvent(KeyBinding keybinding)
- {
- System.out.println("Keyboard Event");
- Minecraft mc = ModLoader.getMinecraftInstance();
- EntityPlayer entityplayer = mc.thePlayer;
- if(keybinding == this.key_test)
- {
- entityplayer.health = 20;
- entityplayer.motionY += 1.0F;
- }
- }
- @Override
- public String Version() {
- return "**Keybind Test** Minecraft Beta 1.7.3";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment