Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- import org.lwjgl.input.Keyboard;
- public class mod_FogKey extends BaseMod {
- public KeyBinding FogKey = new KeyBinding("FogKey", Keyboard.KEY_F);
- public void load()
- {
- ModLoader.registerKey(this, FogKey, false);
- ModLoader.addLocalization("FogKey", "Fog Key");
- ModLoader.setInGameHook(this, true, true);
- }
- public void keyboardEvent (KeyBinding keybinding)
- {
- Minecraft mc = ModLoader.getMinecraftInstance();
- GameSettings gamesettings = mc.gameSettings;
- if(keybinding == this.FogKey)
- {
- if(mc.currentScreen == null)
- {
- mc.gameSettings.renderDistance = mc.gameSettings.renderDistance + (Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54) ? -1 : 1) & 3;
- }
- }
- }
- public String getVersion()
- {
- return "F Key for MC 1.6.2";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement