From aa87a288bfb28c05b7c475b2d1e26a2863eb9970 Mon Sep 17 00:00:00 2001 From: Bella Date: Wed, 15 Jan 2020 09:37:19 -0500 Subject: [PATCH] close #383 --- .../zeroeightysix/movement/ElytraFlight.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java b/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java index 06160fe6..4bb50051 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java @@ -19,17 +19,18 @@ public class ElytraFlight extends Module { private Setting mode = register(Settings.e("Mode", ElytraFlightMode.FLY)); private Setting highway = register(Settings.b("Highway Mode", false)); private Setting defaultSetting = register(Settings.b("Defaults", false)); - private Setting speed = register(Settings.f("Speed", 1.8f)); - private Setting fallspeed = register(Settings.f("Fall Speed", 0.000050000002f)); - -// private Float fallspeed = .000050000002f; + private Setting speed = register(Settings.f("Speed Highway", 1.8f)); + private Setting upSpeed = register(Settings.f("Up Speed", 0.08f)); + private Setting downSpeed = register(Settings.f("Down Speed", 0.04f)); + private Setting fallSpeedHighway = register(Settings.f("Fall Speed Highway", 0.000050000002f)); + private Setting fallspeed = register(Settings.f("Fall Speed", -.003f)); @Override public void onUpdate() { if (defaultSetting.getValue()) { speed.setValue(1.8f); - fallspeed.setValue(.000050000002f); + fallSpeedHighway.setValue(.000050000002f); defaultSetting.setValue(false); Command.sendChatMessage("[ElytraFlight] Set to defaults!"); } @@ -41,13 +42,14 @@ public class ElytraFlight extends Module { if (mc.player.capabilities.isFlying) { if (highway.getValue()) { mc.player.setVelocity(0, 0, 0); - mc.player.setPosition(mc.player.posX, mc.player.posY - fallspeed.getValue(), mc.player.posZ); + mc.player.setPosition(mc.player.posX, mc.player.posY - fallSpeedHighway.getValue(), mc.player.posZ); mc.player.capabilities.setFlySpeed(speed.getValue()); mc.player.setSprinting(false); } else { - mc.player.setVelocity(0, -.003, 0); + mc.player.setVelocity(0, 0, 0); mc.player.capabilities.setFlySpeed(.915f); + mc.player.setPosition(mc.player.posX, mc.player.posY - fallspeed.getValue(), mc.player.posZ); } } @@ -66,9 +68,9 @@ public class ElytraFlight extends Module { } if (mc.gameSettings.keyBindJump.isKeyDown()) - mc.player.motionY += 0.08; + mc.player.motionY += upSpeed.getValue(); else if (mc.gameSettings.keyBindSneak.isKeyDown()) - mc.player.motionY -= 0.04; + mc.player.motionY -= downSpeed.getValue(); if (mc.gameSettings.keyBindForward.isKeyDown()) { float yaw = (float) Math