Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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(false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement