Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. ;
  2.  
  3. public class NewestSpeed
  4. extends Module {
  5.  
  6.  
  7. private double health;
  8.  
  9. private double packets = 0;
  10. public NewestSpeed() {
  11. super("NewestSpeed", Keyboard.KEY_NONE, Category.PLAYER);
  12. }
  13. public void onRender(){
  14. if (!this.getState()) {
  15. return;
  16. }
  17. Wrapper.mc.thePlayer.posY = Wrapper.mc.thePlayer.posY;
  18.  
  19.  
  20. }
  21. @Override
  22. public void onUpdate() {
  23. if (!this.getState()) {
  24. return;
  25. }
  26. if(Wrapper.mc.thePlayer.onGround){
  27.  
  28. Wrapper.mc.thePlayer.setVelocity(Wrapper.mc.thePlayer.motionX, Wrapper.mc.thePlayer.motionY, Wrapper.mc.thePlayer.motionZ);
  29. double currentSpeed = Math.sqrt(Math.pow(Wrapper.mc.thePlayer.motionX, 2.0) + Math.pow(Wrapper.mc.thePlayer.motionZ, 2.0));
  30. double maxSpeed = 0.6899999976158142;
  31. if (currentSpeed > + maxSpeed) {
  32. Wrapper.mc.thePlayer.motionX = Wrapper.mc.thePlayer.motionX / currentSpeed * maxSpeed ;
  33. Wrapper.mc.thePlayer.motionZ = Wrapper.mc.thePlayer.motionZ / currentSpeed * maxSpeed ;
  34.  
  35. }
  36. }
  37. Wrapper.mc.thePlayer.jumpMovementFactor = (float)((double)Wrapper.mc.thePlayer.jumpMovementFactor * 1.45);
  38. if(Wrapper.mc.thePlayer.moveForward > 0){
  39. Wrapper.mc.thePlayer.setSprinting(true);
  40.  
  41.  
  42. if(Wrapper.mc.thePlayer.onGround){
  43. Wrapper.mc.thePlayer.jump();
  44.  
  45. packets = Wrapper.mc.thePlayer.posY;
  46. }
  47. if(!Wrapper.mc.thePlayer.onGround && packets + 0.399994 <= Wrapper.mc.thePlayer.posY ){
  48. Wrapper.mc.thePlayer.motionY = -0.93;
  49.  
  50. }
  51. }else{
  52. Wrapper.mc.thePlayer.setSprinting(true);
  53. }
  54. // Wrapper.mc.thePlayer.jumpMovementFactor = 0.2;
  55.  
  56.  
  57.  
  58. //0.399994
  59.  
  60.  
  61.  
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement