Advertisement
Guest User

133333:99:-1

a guest
Mar 27th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. package webz.mods;
  2.  
  3. import org.lwjgl.input.Keyboard;
  4.  
  5. import webz.main.Category;
  6.  
  7. public class Flight extends Module{
  8.    
  9.     public static float flyHackSpeed = 0.1f;
  10.  
  11.     public Flight() {
  12.         super("Flight", Keyboard.KEY_F, Category.PLAYER);
  13.     }
  14.    
  15.     public void onDisable(){
  16.         mc.thePlayer.capabilities.isFlying = false;
  17.         super.onDisable();
  18.     }
  19.    
  20.     public void onUpdate(){
  21.         if(isToggled()){
  22.             mc.thePlayer.capabilities.isFlying = true;
  23.            
  24.             if(mc.gameSettings.keyBindJump.isPressed()){
  25.                 mc.thePlayer.motionY += 0.2;
  26.             }
  27.            
  28.             if(mc.gameSettings.keyBindSneak.isPressed()){
  29.                 mc.thePlayer.motionY += 0.2;
  30.             }
  31.            
  32.             if(mc.gameSettings.keyBindForward.isPressed()){
  33.                 mc.thePlayer.capabilities.setFlySpeed(flyHackSpeed);
  34.             }
  35.            
  36.         }
  37.     }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement