Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.54 KB | None | 0 0
  1. package me.Eagler.Yay.module.modules.movement;
  2.  
  3. import me.Eagler.Yay.module.*;
  4. import me.Eagler.Yay.utils.*;
  5. import java.awt.*;
  6. import java.util.*;
  7. import me.Eagler.Yay.*;
  8. import de.Hero.settings.*;
  9. import me.Eagler.Yay.gui.*;
  10. import net.minecraft.util.*;
  11. import net.minecraft.potion.*;
  12. import net.minecraft.client.entity.*;
  13.  
  14. public class Speed extends Module
  15. {
  16. public static boolean isenabled;
  17. public static TimeHelper time;
  18.  
  19. static {
  20. Speed.time = new TimeHelper();
  21. }
  22.  
  23. public Speed() {
  24. super("Speed", Color.WHITE.getRGB(), 0, Module.Category.MOVEMENT);
  25. final ArrayList<String> options = new ArrayList<String>();
  26. options.add("AAC");
  27. options.add("NCPHop");
  28. options.add("YPort");
  29. options.add("Long");
  30. options.add("Mineplex");
  31. options.add("TestBhop")
  32. Yay.setmgr.rSetting(new Setting("SpeedMode", (Module)this, "AAC", (ArrayList)options));
  33. }
  34.  
  35. public void onEnabled() {
  36. if (GuiLogin.rank.equalsIgnoreCase("bronze")) {
  37. Speed.mc.thePlayer.addChatComponentMessage((IChatComponent)new ChatComponentText(String.valueOf(Yay.getPrefix()) + "§cDies ist ein §7Silber §fFeature."));
  38. Speed.mc.thePlayer.addChatComponentMessage((IChatComponent)new ChatComponentText(String.valueOf(Yay.getPrefix()) + "§cUm deine Version zu §cupgraden melde dich auf §cSkype §cbei §cdem §cEntwickler."));
  39. this.setEnabled(false);
  40. }
  41. }
  42.  
  43. public void onUpdate() {
  44. if (this.isEnabled()) {
  45. if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("AAC")) {
  46. this.setTag("Speed §7AAC");
  47. if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
  48. Speed.mc.gameSettings.keyBindJump.pressed = false;
  49. if (Speed.mc.thePlayer.onGround) {
  50. Speed.mc.thePlayer.jump();
  51. Speed.mc.thePlayer.motionY = 0.41;
  52. Speed.mc.timer.timerSpeed = 1.0f;
  53. }
  54. else {
  55. Speed.mc.timer.timerSpeed = 1.01f;
  56. final EntityPlayerSP thePlayer = Speed.mc.thePlayer;
  57. thePlayer.motionX *= 1.00600004196167;
  58. final EntityPlayerSP thePlayer2 = Speed.mc.thePlayer;
  59. thePlayer2.motionZ *= 1.00600004196167;
  60. }
  61. }
  62. }
  63. else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("NCPHop")) {
  64. this.setTag("Speed §7NCPHop");
  65. Speed.mc.gameSettings.keyBindJump.pressed = false;
  66. if (Speed.mc.thePlayer == null || Speed.mc.theWorld == null) {
  67. return;
  68. }
  69. if (Speed.mc.thePlayer.onGround) {
  70. Speed.isenabled = true;
  71. }
  72. if ((Speed.mc.gameSettings.keyBindForward.pressed || Speed.mc.gameSettings.keyBindBack.pressed || Speed.mc.gameSettings.keyBindLeft.pressed || Speed.mc.gameSettings.keyBindRight.pressed) && Speed.mc.thePlayer.onGround && !Speed.mc.thePlayer.isCollidedHorizontally) {
  73. Speed.mc.thePlayer.distanceWalkedModified = 0.0f;
  74. Speed.mc.thePlayer.jump();
  75. Speed.isenabled = true;
  76. }
  77. if (Speed.mc.thePlayer.isAirBorne && !Speed.mc.gameSettings.keyBindJump.pressed) {
  78. Speed.mc.thePlayer.onGround = true;
  79. final EntityPlayerSP thePlayer3 = Speed.mc.thePlayer;
  80. thePlayer3.motionX *= 1.0;
  81. Speed.mc.thePlayer.onGround = false;
  82. final EntityPlayerSP thePlayer4 = Speed.mc.thePlayer;
  83. thePlayer4.motionZ *= 1.0;
  84. Speed.mc.thePlayer.onGround = true;
  85. Speed.isenabled = false;
  86. }
  87. }
  88. else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("YPort")) {
  89. this.setTag("Speed §7YPort");
  90. if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
  91. Speed.mc.gameSettings.keyBindJump.pressed = false;
  92. if (Speed.mc.thePlayer.onGround) {
  93. Speed.mc.thePlayer.jump();
  94. Speed.mc.timer.timerSpeed = 1.0f;
  95. }
  96. else {
  97. Speed.mc.thePlayer.motionY = -1.0;
  98. Speed.mc.timer.timerSpeed = 3.5f;
  99. }
  100. }
  101. }
  102. else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Long")) {
  103. this.setTag("Speed §7Long");
  104. Speed.mc.gameSettings.keyBindJump.pressed = false;
  105. if (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed()) {
  106. if (Speed.mc.thePlayer.onGround) {
  107. Speed.mc.thePlayer.jump();
  108. }
  109. final float direction = Speed.mc.thePlayer.rotationYaw + ((Speed.mc.thePlayer.moveForward < 0.0f) ? 180 : 0) + ((Speed.mc.thePlayer.moveStrafing > 0.0f) ? (-90.0f * ((Speed.mc.thePlayer.moveForward < 0.0f) ? -0.5f : ((Speed.mc.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f))) : 0.0f) - ((Speed.mc.thePlayer.moveStrafing < 0.0f) ? (-90.0f * ((Speed.mc.thePlayer.moveForward < 0.0f) ? -0.5f : ((Speed.mc.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f))) : 0.0f);
  110. final float xDir = (float)Math.cos((direction + 90.0f) * 3.141592653589793 / 180.0);
  111. final float zDir = (float)Math.sin((direction + 90.0f) * 3.141592653589793 / 180.0);
  112. if (Speed.mc.thePlayer.isCollidedVertically && (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed())) {
  113. Speed.mc.thePlayer.motionX = xDir * 0.29f;
  114. Speed.mc.thePlayer.motionZ = zDir * 0.29f;
  115. }
  116. if (Speed.mc.thePlayer.motionY == 0.33319999363422365 && (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed())) {
  117. if (Speed.mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
  118. Speed.mc.thePlayer.motionX = xDir * 0.34;
  119. Speed.mc.thePlayer.motionZ = zDir * 0.34;
  120. }
  121. else {
  122. Speed.mc.thePlayer.motionX = xDir * 0.541;
  123. Speed.mc.thePlayer.motionZ = zDir * 0.541;
  124. }
  125. }
  126. }
  127. }
  128. else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Mineplex")) {
  129. this.setTag("Speed §7Mineplex");
  130. Speed.mc.gameSettings.keyBindJump.pressed = false;
  131. if (Speed.mc.thePlayer == null || Speed.mc.theWorld == null) {
  132. return;
  133. }
  134. if (Speed.mc.thePlayer.onGround) {
  135. Speed.isenabled = true;
  136. }
  137. if ((Speed.mc.gameSettings.keyBindForward.pressed || Speed.mc.gameSettings.keyBindBack.pressed || Speed.mc.gameSettings.keyBindLeft.pressed || Speed.mc.gameSettings.keyBindRight.pressed) && Speed.mc.thePlayer.onGround && !Speed.mc.thePlayer.isCollidedHorizontally) {
  138. Speed.mc.thePlayer.distanceWalkedModified = 0.0f;
  139. Speed.mc.thePlayer.jump();
  140. Speed.isenabled = true;
  141. }
  142. if (Speed.mc.thePlayer.isAirBorne && !Speed.mc.gameSettings.keyBindJump.pressed) {
  143. Speed.mc.thePlayer.onGround = true;
  144. final EntityPlayerSP thePlayer5 = Speed.mc.thePlayer;
  145. thePlayer5.motionX *= 1.2;
  146. Speed.mc.thePlayer.onGround = false;
  147. final EntityPlayerSP thePlayer6 = Speed.mc.thePlayer;
  148. thePlayer6.motionZ *= 1.2;
  149. Speed.mc.thePlayer.onGround = true;
  150. Speed.isenabled = false;
  151. }
  152. }
  153. }
  154. }
  155. public void onUpdate() {
  156. if (this.isEnabled()) {
  157. if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("TestBhop")) {
  158. this.setTag("Speed §7TestBhop");
  159. if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
  160. Speed.mc.gameSettings.keyBindJump.pressed = false;
  161. if (Speed.mc.thePlayer.onGround) {
  162. Speed.mc.thePlayer.jump();
  163. Speed.mc.thePlayer.motionY = 0.41;
  164. Speed.mc.timer.timerSpeed = 1.5f;
  165. Speed.mc.thePlayer.motionX = 0.5
  166.  
  167. public void onDisabled() {
  168. Speed.mc.timer.timerSpeed = 1.0f;
  169. }
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement