Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package webz.mods;
- import org.lwjgl.input.Keyboard;
- import webz.main.Category;
- public class Flight extends Module{
- public static float flyHackSpeed = 0.1f;
- public Flight() {
- super("Flight", Keyboard.KEY_F, Category.PLAYER);
- }
- public void onDisable(){
- mc.thePlayer.capabilities.isFlying = false;
- super.onDisable();
- }
- public void onUpdate(){
- if(isToggled()){
- mc.thePlayer.capabilities.isFlying = true;
- if(mc.gameSettings.keyBindJump.isPressed()){
- mc.thePlayer.motionY += 0.2;
- }
- if(mc.gameSettings.keyBindSneak.isPressed()){
- mc.thePlayer.motionY += 0.2;
- }
- if(mc.gameSettings.keyBindForward.isPressed()){
- mc.thePlayer.capabilities.setFlySpeed(flyHackSpeed);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement