- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 25
- Points
- 0
Hier Der Code
[hide]
[/hide]
[hide]
Code:
if (mc.theWorld != null && mc.thePlayer != null) {
mc.gameSettings.keyBindJump.pressed = false;
if (mc.gameSettings.keyBindForward.pressed && !mc.thePlayer.isCollidedHorizontally) {
if (mc.thePlayer.onGround) {
mc.thePlayer.jump();
mc.thePlayer.motionY = 0.4;
mc.timer.timerSpeed = 1.05F;
mc.thePlayer.motionX *= 1.165F;
mc.thePlayer.motionZ *= 1.165F;
} else {
mc.thePlayer.jumpMovementFactor = 0.026F;
double direction = getDirection();
double speed = 1.0157;
double currentMotion = Math.sqrt(
mc.thePlayer.motionX * mc.thePlayer.motionX + mc.thePlayer.motionZ * mc.thePlayer.motionZ);
mc.thePlayer.motionX = -Math.sin(direction) * speed * currentMotion;
mc.thePlayer.motionZ = Math.cos(direction) * speed * currentMotion;
}
}
}
-----------------------------------------------------------------------------
private float getDirection() {
float var1 = mc.thePlayer.rotationYaw;
if (mc.thePlayer.moveForward < 0.0F) {
var1 += 180.0F;
}
float forward = 1.0F;
if (mc.thePlayer.moveForward < 0.0F) {
forward = -0.5F;
} else if (mc.thePlayer.moveForward > 0.0F) {
forward = 0.5F;
}
if (mc.thePlayer.moveStrafing > 0.0F) {
var1 -= 90.0F * forward;
}
if (mc.thePlayer.moveStrafing < 0.0F) {
var1 += 90.0F * forward;
}
var1 *= 0.017453292F;
return var1;
}