Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.17 KB | None | 0 0
  1. public class Flight extends Module {
  2. public static boolean active;
  3. @Option.Op(min = 0.0D, max = 10.0D, increment = 0.4D, name = "Vanilla Speed")
  4. public static double vSpeed = 0.4D;
  5.  
  6. @Option.Op(name = "Hypixel")
  7. public static boolean Mode1 = false;
  8.  
  9. @Option.Op(name = "Vanilla")
  10. public static boolean Mode2 = true;
  11.  
  12. @Option.Op(name = "Packet")
  13. public static boolean Mode3 = false;
  14.  
  15. @Option.Op(name = "Mineplex")
  16. public static boolean Mode4 = false;
  17.  
  18. @Option.Op(name = "Guardian Timer")
  19. public static boolean Mode5 = false;
  20.  
  21. public static String modname;
  22. public boolean zoomies = false;
  23. int counter;
  24.  
  25. public Flight() {
  26. super("Flight", 0, Category.MOVEMENT, true);
  27. }
  28.  
  29. public void onUpdate() {
  30. if (!this.isEnabled)
  31. return;
  32. if (this.Mode1 == true) {
  33. Minecraft.thePlayer.motionY = 0f;
  34. mode1();
  35.  
  36. modname = "Hypixel";
  37. } else if (this.Mode2 == true) {
  38. // Check mode2\\
  39. mode2();
  40.  
  41. modname = "Vanilla";
  42.  
  43. } else if (this.Mode3 == true) {
  44. mode3();
  45.  
  46. modname = "Packet";
  47. } else if (this.Mode5 == true) {
  48. mode5();
  49.  
  50. modname = "Guardian Timer";
  51. } else if (this.Mode4 == true) {
  52. mode4();
  53.  
  54. super.onUpdate();
  55. }
  56. }
  57.  
  58. private void mode5() {
  59. if (Flight.Mode5 == true) {
  60. Flight.modname = "Guardian Timer";
  61. int xd = 0;
  62. if (ClientUtils.mc().gameSettings.keyBindJump.pressed) {
  63. ClientUtils.mc().thePlayer.motionY = 1;
  64. }
  65. if (ClientUtils.mc().gameSettings.keyBindSneak.pressed) {
  66. ClientUtils.mc().thePlayer.motionY = (-1);
  67. }
  68. if ((isMoving(ClientUtils.player())) && (!ClientUtils.mc().gameSettings.keyBindJump.pressed)
  69. && (!ClientUtils.mc().gameSettings.keyBindSneak.pressed)
  70. && ((ClientUtils.mc().thePlayer.motionY <= -0.41D) || (ClientUtils.mc().thePlayer.onGround))) {
  71. damagePlayer((int) 0.1);
  72. setSpeed(0.2873D * 1 * 10.0D);
  73. ClientUtils.mc().thePlayer.motionY = -0.6D;
  74. Timer timer = ClientUtils.mc().timer;
  75. Timer.timerSpeed = 0.8F;
  76. Object dawd = new HashMap();
  77. ArrayList<Object[]> edeffesesfsfe = new ArrayList();
  78. for (int j = 0; (j < new String[] { "RDMSTRING" }.length) && (j == 1); j++) {
  79. }
  80. ByteArrayOutputStream adawadwadsdaw = new ByteArrayOutputStream();
  81. String[] awsfddda = new String[1];
  82. int[] dwsdfsfdadd = new int[3];
  83. char[] arrayOfChar = new char[23];
  84. }
  85. if ((!ClientUtils.mc().gameSettings.keyBindJump.pressed)
  86. && (!ClientUtils.mc().gameSettings.keyBindSneak.pressed)
  87. && ((ClientUtils.mc().thePlayer.motionY <= -0.42D) || (ClientUtils.mc().thePlayer.onGround))) {
  88. ClientUtils.mc().thePlayer.motionY = 0.4D;
  89. }
  90. }
  91. }
  92.  
  93. public static boolean isMoving(Entity ent) {
  94. return (Minecraft.getMinecraft().thePlayer.moveForward != 0.0F)
  95. || (Minecraft.getMinecraft().thePlayer.moveStrafing != 0.0F);
  96. }
  97.  
  98. public static void setSpeed(double speed) {
  99. ClientUtils.mc().thePlayer.motionX = (-MathHelper.sin(getDirection()) * speed);
  100. ClientUtils.mc().thePlayer.motionZ = (MathHelper.cos(getDirection()) * speed);
  101. }
  102.  
  103. public static float getDirection() {
  104. float yaw = ClientUtils.mc().thePlayer.rotationYawHead;
  105. float forward = ClientUtils.mc().thePlayer.moveForward;
  106. float strafe = ClientUtils.mc().thePlayer.moveStrafing;
  107. yaw += (forward < 0.0F ? 180 : 0);
  108. if (strafe < 0.0F) {
  109. yaw += (forward == 0.0F ? 90 : forward < 0.0F ? -45 : 45);
  110. }
  111. if (strafe > 0.0F) {
  112. yaw -= (forward == 0.0F ? 90 : forward < 0.0F ? -45 : 45);
  113. }
  114. return yaw * 0.017453292F;
  115. }
  116.  
  117. private void mode1() {
  118. if (Mode1) {
  119. modname = "Hypixel";
  120. mc.thePlayer.motionY = 0;
  121. mc.thePlayer.onGround = false;
  122. if (!mc.thePlayer.isMoving()) {
  123. mc.thePlayer.setSpeed(0);
  124. } else {
  125. mc.thePlayer.setSpeed(0.259);
  126. }
  127. for (int i = 0; i < 3; i++) {
  128. mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 1.0E-12, mc.thePlayer.posZ);
  129. if (mc.thePlayer.ticksExisted % 3 == 0) {
  130. mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY - 1.0E-12, mc.thePlayer.posZ);
  131. }
  132. }
  133. }
  134. }
  135.  
  136. private void mode2() {
  137. if (Mode2) {
  138. modname = "Vanilla";
  139. mc.thePlayer.onGround = true;
  140. Minecraft.thePlayer.capabilities.isFlying = true;
  141. if (mc.thePlayer.isMoving()) {
  142. Minecraft.thePlayer.setSpeed(vSpeed);
  143. } else {
  144. mc.thePlayer.setSpeed(0);
  145. }
  146. }
  147. }
  148.  
  149. private void mode3() {
  150.  
  151. if (Flight.Mode3 == true) {
  152. Flight.modname = "Packet";
  153. mc.thePlayer.motionY = 1.0E-8D;
  154. mc.timer.timerSpeed = (this.zoomies ? 1 : 1);
  155. mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(
  156. mc.thePlayer.posX + mc.thePlayer.motionX * 11.0D,
  157. mc.thePlayer.posY
  158. + (mc.gameSettings.keyBindJump.pressed ? 0.0624D : this.zoomies ? 0.0625D : 1.0E-8D)
  159. - (mc.gameSettings.keyBindSneak.pressed ? 0.0624D : this.zoomies ? 0.0625D : 2.0E-8D),
  160. mc.thePlayer.posZ + mc.thePlayer.motionZ * 11.0D, mc.thePlayer.rotationYaw,
  161. mc.thePlayer.rotationPitch, false));
  162. mc.thePlayer.sendQueue.addToSendQueue(
  163. new C03PacketPlayer.C06PacketPlayerPosLook(mc.thePlayer.posX + mc.thePlayer.motionX * 11.0D,
  164. mc.thePlayer.posY + 1337.0D, mc.thePlayer.posZ + mc.thePlayer.motionZ * 11.0D,
  165. mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, false));
  166. this.zoomies = (!this.zoomies);
  167. }
  168. }
  169.  
  170. public void mode4() {
  171. if (Mode4) {
  172. this.modname = "Mineplex";
  173. this.counter += 1;
  174. if (mc.theWorld.getBlock((int) mc.thePlayer.posX, (int) mc.thePlayer.posY - 1,
  175. (int) mc.thePlayer.posZ) == Blocks.air && mc.thePlayer.isMoving()) {
  176. mc.thePlayer.motionY = 0.005D;
  177. mc.thePlayer.onGround = true;
  178. mc.thePlayer.setSpeed(0.9);
  179. mc.thePlayer.motionY = 0.41D - 0.41532D;
  180.  
  181. this.counter += 1;
  182. if (this.counter > 10) {
  183. mc.thePlayer.swingItem();
  184. this.counter = 0;
  185. }
  186.  
  187. } else {
  188. mc.thePlayer.setSpeed(0);
  189. }
  190. }
  191. }
  192.  
  193. public void onDisable() {
  194. ClientUtils.mc().thePlayer.capabilities.setFlySpeed(0.0453F);
  195. mc.timer.timerSpeed = 0.1f;
  196. mc.timer.timerSpeed = 1.0f;
  197. mc.thePlayer.setSpeed(0);
  198. mc.thePlayer.capabilities.isFlying = false;
  199. if (mc.thePlayer.capabilities.isCreativeMode == false) {
  200. mc.thePlayer.capabilities.allowFlying = false;
  201. Minecraft.thePlayer.onGround = false;
  202. Minecraft.thePlayer.capabilities.isFlying = false;
  203. active = false;
  204. super.onDisable();
  205. }
  206. }
  207.  
  208. public void damagePlayer(int value) {
  209. for (int i = 0; i < (70 * value); i++) {
  210. mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
  211. mc.thePlayer.posY + 0.06D, mc.thePlayer.posZ, false));
  212. mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
  213. mc.thePlayer.posY, mc.thePlayer.posZ, false));
  214. }
  215. mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
  216. mc.thePlayer.posY + 0.1D, mc.thePlayer.posZ, false));
  217. }
  218.  
  219. public void onEnable() {
  220. active = true;
  221. if (Mode4) {
  222. mc.thePlayer.addVelocity(0, 0.33, 0);
  223. mc.thePlayer.jump();
  224. mc.thePlayer.setSpeed(7);
  225. mc.thePlayer.swingItem();
  226. }
  227.  
  228. super.onEnable();
  229. }
  230.  
  231. public String getValue() {
  232. return modname;
  233. }
  234. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement