Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double lastGround = 0;
- boolean fix = false;
- boolean jumpFix = false;
- boolean firstMove = false;
- double move = 0;
- @Override
- public void onUpdate() {
- if (!this.isEnabled()) {
- lastGround = mc.thePlayer.posY;
- fix = false;
- jumpFix = false;
- return;
- }
- if (jumpFix) {
- // mc.thePlayer.motionY /= 1.05;
- if (move > 0.01) {
- move(mc.thePlayer.rotationYaw, (float) move);
- } else {
- jumpFix = false;
- }
- return;
- }
- if (fix) {
- fix = false;
- mc.thePlayer.motionY = 0.0;
- jumpFix = true;
- move(mc.thePlayer.rotationYaw, (float) 3.6, 0.012f);
- move = 0.28f;
- return;
- }
- if (lastGround <= mc.thePlayer.posY - 2.4) {
- mc.thePlayer.motionY = 0.00;
- fix = true;
- return;
- } else if (lastGround <= mc.thePlayer.posY - 1.5) {
- mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.95, mc.thePlayer.posZ);
- mc.thePlayer.motionX = 0;
- mc.thePlayer.motionZ = 0;
- return;
- }
- if (mc.thePlayer.motionY > 0.0001) {
- mc.thePlayer.motionY += 0.01496;
- move(mc.thePlayer.rotationYaw, (float) 0.39f); // Changable
- firstMove = false;
- }
- super.onUpdate();
- }
- @Override
- public void onEnable() {
- move(mc.thePlayer.rotationYaw, 0f, 0.42f);
- super.onEnable();
- }
- public void move(float yaw, float multiplyer, float up) {
- // double moveX = -Math.sin(Math.toRadians(yaw)) * 0.1644;
- double moveX = -Math.sin(Math.toRadians(yaw)) * multiplyer;
- double moveZ = Math.cos(Math.toRadians(yaw)) * multiplyer;
- double moveY = up;
- Wrapper.mc.thePlayer.motionX = moveX;
- Wrapper.mc.thePlayer.motionY = moveY;
- Wrapper.mc.thePlayer.motionZ = moveZ;
- }
- public void move(float yaw, float multiplyer) {
- double moveX = -Math.sin(Math.toRadians(yaw)) * multiplyer;
- double moveZ = Math.cos(Math.toRadians(yaw)) * multiplyer;
- Wrapper.mc.thePlayer.motionX = moveX;
- Wrapper.mc.thePlayer.motionZ = moveZ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement