Advertisement
Guest User

veltfly

a guest
Nov 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. package me.aristhena.client.module.modules.movement;
  2.  
  3. import me.aristhena.client.module.*;
  4. import me.aristhena.event.events.*;
  5. import me.aristhena.utils.*;
  6. import net.minecraft.entity.*;
  7. import java.util.*;
  8. import java.io.*;
  9. import me.aristhena.event.*;
  10. import net.minecraft.client.*;
  11. import net.minecraft.util.*;
  12.  
  13. @Mod(color = 8607114)
  14. public class VeltFly extends Module
  15. {
  16. @EventTarget
  17. private void onUpdate(final UpdateEvent event) {
  18. if (event.getState() == Event.State.PRE) {
  19. final int xd = 0;
  20. if (ClientUtils.mc().gameSettings.keyBindJump.pressed) {
  21. ClientUtils.mc().thePlayer.motionY = Fly.speed;
  22. }
  23. if (ClientUtils.mc().gameSettings.keyBindSneak.pressed) {
  24. ClientUtils.mc().thePlayer.motionY = -Fly.speed;
  25. }
  26. if (isMoving(ClientUtils.player()) && !ClientUtils.mc().gameSettings.keyBindJump.pressed && !ClientUtils.mc().gameSettings.keyBindSneak.pressed && (ClientUtils.mc().thePlayer.motionY <= -0.41 || ClientUtils.mc().thePlayer.onGround)) {
  27. setSpeed(0.2873 * Fly.speed * 10.0);
  28. ClientUtils.mc().thePlayer.motionY = -0.6;
  29. event.isOnground();
  30. final Timer timer = ClientUtils.mc().timer;
  31. Timer.timerSpeed = 0.8f;
  32. final Object dawd = new HashMap();
  33. final ArrayList<Object[]> edeffesesfsfe = new ArrayList<Object[]>();
  34. for (int j = 0; j < new String[] { "RDMSTRING" }.length && j == 1; ++j) {}
  35. final ByteArrayOutputStream adawadwadsdaw = new ByteArrayOutputStream();
  36. final String[] awsfddda = { null };
  37. final int[] dwsdfsfdadd = new int[3];
  38. final char[] array = new char[23];
  39. }
  40. if (!ClientUtils.mc().gameSettings.keyBindJump.pressed && !ClientUtils.mc().gameSettings.keyBindSneak.pressed && (ClientUtils.mc().thePlayer.motionY <= -0.42 || ClientUtils.mc().thePlayer.onGround)) {
  41. ClientUtils.mc().thePlayer.motionY = 0.4;
  42. }
  43. }
  44. }
  45.  
  46. public static boolean isMoving(final Entity ent) {
  47. return Minecraft.getMinecraft().thePlayer.moveForward != 0.0f || Minecraft.getMinecraft().thePlayer.moveStrafing != 0.0f;
  48. }
  49.  
  50. public static void setSpeed(final double speed) {
  51. ClientUtils.mc().thePlayer.motionX = -MathHelper.sin(getDirection()) * speed;
  52. ClientUtils.mc().thePlayer.motionZ = MathHelper.cos(getDirection()) * speed;
  53. }
  54.  
  55. public static float getDirection() {
  56. float yaw = ClientUtils.mc().thePlayer.rotationYawHead;
  57. final float forward = ClientUtils.mc().thePlayer.moveForward;
  58. final float strafe = ClientUtils.mc().thePlayer.moveStrafing;
  59. yaw += ((forward < 0.0f) ? 180 : 0);
  60. if (strafe < 0.0f) {
  61. yaw += ((forward < 0.0f) ? -45 : ((forward == 0.0f) ? 90 : 45));
  62. }
  63. if (strafe > 0.0f) {
  64. yaw -= ((forward < 0.0f) ? -45 : ((forward == 0.0f) ? 90 : 45));
  65. }
  66. return yaw * 0.017453292f;
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement