Advertisement
BHOPPEDD

Untitled

Jun 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. @SubscribeEvent
  2. public void OnTick(final TickEvent e) {
  3. if (Utility.getMinecraft().gameSettings.keyBindForward.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindLeft.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindRight.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindBack.getIsKeyPressed()) {
  4. Utility.getMinecraft();
  5. final float rotationYaw = Minecraft.thePlayer.rotationYaw;
  6. Utility.getMinecraft();
  7. final float n = rotationYaw + ((Minecraft.thePlayer.moveForward < 0.0f) ? 180 : 0);
  8. Utility.getMinecraft();
  9. float n4;
  10. if (Minecraft.thePlayer.moveStrafing > 0.0f) {
  11. final float n2 = -90.0f;
  12. Utility.getMinecraft();
  13. float n3;
  14. if (Minecraft.thePlayer.moveForward < 0.0f) {
  15. n3 = -0.5f;
  16. }
  17. else {
  18. Utility.getMinecraft();
  19. n3 = ((Minecraft.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f);
  20. }
  21. n4 = n2 * n3;
  22. }
  23. else {
  24. n4 = 0.0f;
  25. }
  26. final float n5 = n + n4;
  27. Utility.getMinecraft();
  28. float n8;
  29. if (Minecraft.thePlayer.moveStrafing < 0.0f) {
  30. final float n6 = -90.0f;
  31. Utility.getMinecraft();
  32. float n7;
  33. if (Minecraft.thePlayer.moveForward < 0.0f) {
  34. n7 = -0.5f;
  35. }
  36. else {
  37. Utility.getMinecraft();
  38. n7 = ((Minecraft.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f);
  39. }
  40. n8 = n6 * n7;
  41. }
  42. else {
  43. n8 = 0.0f;
  44. }
  45. final float direction = n5 - n8;
  46. final float xDir = (float)Math.cos((direction + 90.0f) * 3.141592653589793 / 180.0);
  47. final float zDir = (float)Math.sin((direction + 90.0f) * 3.141592653589793 / 180.0);
  48. Utility.getMinecraft();
  49. if (Minecraft.thePlayer.motionY == 0.33319999363422365 && (Utility.getMinecraft().gameSettings.keyBindForward.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindLeft.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindRight.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindBack.getIsKeyPressed())) {
  50. Utility.getMinecraft();
  51. if (Minecraft.thePlayer.isPotionActive(Potion.moveSpeed)) {
  52. Utility.getMinecraft();
  53. Minecraft.thePlayer.motionX = xDir * 1.34;
  54. Utility.getMinecraft();
  55. Minecraft.thePlayer.motionZ = zDir * 1.34;
  56. }
  57. else {
  58. Utility.getMinecraft();
  59. Minecraft.thePlayer.motionX = xDir * 1.261;
  60. Utility.getMinecraft();
  61. Minecraft.thePlayer.motionZ = zDir * 1.261;
  62. }
  63. }
  64. }
  65. }
  66.  
  67. private boolean canSpeed() {
  68. Utility.getMinecraft();
  69. if (!Minecraft.thePlayer.isOnLadder()) {
  70. Utility.getMinecraft();
  71. if (!Minecraft.thePlayer.isInWater()) {
  72. Utility.getMinecraft();
  73. if (!Minecraft.thePlayer.isSneaking()) {
  74. Utility.getMinecraft();
  75. if (Minecraft.thePlayer.motionX != 0.0) {
  76. Utility.getMinecraft();
  77. if (Minecraft.thePlayer.motionZ != 0.0 && !LongCock.moveUtils.isOnLiquid()) {
  78. return true;
  79. }
  80. }
  81. }
  82. }
  83. }
  84. return false;
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement