SHARE
TWEET

hoe

a guest Sep 22nd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public Strafe() {
  2.         super("cunt", "nigger", "", Keyboard.KEY_NONE, Category.guitest, -1);
  3.         speed = (forgot wtf running speed is)f;
  4.     }
  5.  
  6.     @EventTarget
  7.     public void onEvent(MoveEvent event) {
  8.         if (!getState()) {
  9.             return;
  10.         }
  11.         if (.mc.player.isAirBorne) {
  12.             moveSpeed = Math.max(moveSpeed, getBaseMoveSpeed());
  13.             MovementInput movementInput = mc.player.movementInput;
  14.             float forward = movementInput.moveForward;
  15.             float strafe = movementInput.moveStrafe;
  16.             float yaw = mc.player.rotationYaw;
  17.             if (forward == 0.0f && strafe == 0.0f) {
  18.                 event.x = 0.0;
  19.                 event.z = 0.0;
  20.             } else if (forward != 0.0f) {
  21.                 if (strafe >= 1.0f) {
  22.                     yaw += (float) (forward > 0.0f ? -45 : 45);
  23.                     strafe = 0.0f;
  24.                 } else if (strafe <= -1.0f) {
  25.                     yaw += (float) (forward > 0.0f ? 45 : -45);
  26.                     strafe = 0.0f;
  27.                 }
  28.                 if (forward > 0.0f) {
  29.                     forward = 1.0f;
  30.                 } else if (forward < 0.0f) {
  31.                     forward = -1.0f;
  32.                 }
  33.             }
  34.             double mx2 = Math.cos(Math.toRadians(yaw + 90.0f));
  35.             double mz2 = Math.sin(Math.toRadians(yaw + 90.0f));
  36.             double motionX = (double) forward * moveSpeed * mx2 + (double) strafe * moveSpeed * mz2;
  37.             double motionZ = (double) forward * moveSpeed * mz2 - (double) strafe * moveSpeed * mx2;
  38.             event.x = (double) forward * moveSpeed * mx2 + (double) strafe * moveSpeed * mz2;
  39.             event.z = (double) forward * moveSpeed * mz2 - (double) strafe * moveSpeed * mx2;
  40.             mc.player.connection.sendPacket(new CPacketPlayer(false));
  41.             mc.player.connection.sendPacket(new CPacketPlayer(true));
  42.         } else {
  43.             mc.player.jumpMovementFactor = 0.02f;
  44.             ReflectionUtils.getTimer().elapsedTicks = (int) 1.0F;
  45.         }
  46.     }
  47.  
  48.     public void onUpdate() {
  49.         if (!getState()) {
  50.             return;
  51.         }
  52.  
  53.         double xDist = mc.player.posX - mc.player.prevPosX;
  54.         double zDist = mc.player.posZ - mc.player.prevPosZ;
  55.         lastDist = Math.sqrt(xDist * xDist + zDist * zDist);
  56.  
  57.     }
  58.  
  59.     public void onEnable() {
  60.         EventManager.register();
  61.         super.onEnable();
  62.         ReflectionUtils.getTimer().elapsedTicks = (int) 1.0F;
  63.         ReflectionUtils.setSpeedInAir(mc.player, 0.04F);
  64.         cancel = false;
  65.         stage = 1;
  66.         double d2 = moveSpeed = mc.player == null ? 0.2873 : getBaseMoveSpeed();
  67.     }
  68.  
  69.     public void onDisable() {
  70.         EventManager.unregister();
  71.         super.onDisable();
  72.         ReflectionUtils.getTimer().elapsedTicks = (int) 1.0F;
  73.         moveSpeed = getBaseMoveSpeed();
  74.         yOffset = 0.0;
  75.         stage = 0;
  76.         disabling = false;
  77.         cancel = true;
  78.         ReflectionUtils.setSpeedInAir(mc.player, 0.02F);
  79.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top