Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- public class NewestSpeed
- extends Module {
- private double health;
- private double packets = 0;
- public NewestSpeed() {
- super("NewestSpeed", Keyboard.KEY_NONE, Category.PLAYER);
- }
- public void onRender(){
- if (!this.getState()) {
- return;
- }
- Wrapper.mc.thePlayer.posY = Wrapper.mc.thePlayer.posY;
- }
- @Override
- public void onUpdate() {
- if (!this.getState()) {
- return;
- }
- if(Wrapper.mc.thePlayer.onGround){
- Wrapper.mc.thePlayer.setVelocity(Wrapper.mc.thePlayer.motionX, Wrapper.mc.thePlayer.motionY, Wrapper.mc.thePlayer.motionZ);
- double currentSpeed = Math.sqrt(Math.pow(Wrapper.mc.thePlayer.motionX, 2.0) + Math.pow(Wrapper.mc.thePlayer.motionZ, 2.0));
- double maxSpeed = 0.6899999976158142;
- if (currentSpeed > + maxSpeed) {
- Wrapper.mc.thePlayer.motionX = Wrapper.mc.thePlayer.motionX / currentSpeed * maxSpeed ;
- Wrapper.mc.thePlayer.motionZ = Wrapper.mc.thePlayer.motionZ / currentSpeed * maxSpeed ;
- }
- }
- Wrapper.mc.thePlayer.jumpMovementFactor = (float)((double)Wrapper.mc.thePlayer.jumpMovementFactor * 1.45);
- if(Wrapper.mc.thePlayer.moveForward > 0){
- Wrapper.mc.thePlayer.setSprinting(true);
- if(Wrapper.mc.thePlayer.onGround){
- Wrapper.mc.thePlayer.jump();
- packets = Wrapper.mc.thePlayer.posY;
- }
- if(!Wrapper.mc.thePlayer.onGround && packets + 0.399994 <= Wrapper.mc.thePlayer.posY ){
- Wrapper.mc.thePlayer.motionY = -0.93;
- }
- }else{
- Wrapper.mc.thePlayer.setSprinting(true);
- }
- // Wrapper.mc.thePlayer.jumpMovementFactor = 0.2;
- //0.399994
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement