Advertisement
projectwoosh

Bier

Dec 9th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. package net.thewoosh.checkmybuffers.modules.movement;
  2.  
  3. import net.minecraft.block.material.Material;
  4. import net.thewoosh.checkmybuffers.modules.Category;
  5. import net.thewoosh.checkmybuffers.modules.Module;
  6.  
  7. public class Glide extends Module {
  8.  
  9.     public Glide(int hotkey) {
  10.         super("Glide", hotkey, Category.MOVEMENT);
  11.     }
  12.    
  13.     @Override
  14.     public void onUpdate() {
  15.         double oldY = mc.thePlayer.motionY;
  16.         float oldJ = mc.thePlayer.jumpMovementFactor;
  17.         if (this.isEnabled()) {
  18.             if ((mc.thePlayer.motionY < 0.0d) && (mc.thePlayer.isAirBorne) && (!mc.thePlayer.isInWater())
  19.                     && (!mc.thePlayer.isOnLadder())) {
  20.                 if (!mc.thePlayer.isInsideOfMaterial(Material.lava)) {
  21.                     mc.thePlayer.motionY = -.125d;
  22.                     mc.thePlayer.jumpMovementFactor *= 1.12337f;
  23.                 }
  24.             }
  25.         } else {
  26.             mc.thePlayer.motionY = oldY;
  27.             mc.thePlayer.jumpMovementFactor = oldJ;
  28.         }
  29.     }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement