diff --git a/src/main/kotlin/com/lambda/module/modules/movement/elytrafly/modes/BounceElytraFly.kt b/src/main/kotlin/com/lambda/module/modules/movement/elytrafly/modes/BounceElytraFly.kt index ebc48b599..0b96fc196 100644 --- a/src/main/kotlin/com/lambda/module/modules/movement/elytrafly/modes/BounceElytraFly.kt +++ b/src/main/kotlin/com/lambda/module/modules/movement/elytrafly/modes/BounceElytraFly.kt @@ -68,7 +68,8 @@ class BounceElytraFly( private val takeoff by c.setting("Takeoff", true, "Automatically jumps and initiates gliding") private val autoPitch by c.setting("Auto Pitch", true, "Automatically pitches the players rotation down to bounce at faster speeds") - private val pitch by c.setting("Pitch", 72.0, -90.0..90.0, 0.000001) { autoPitch } + private val smartPitch by c.setting("Smart", false, "Calculates the best pitch for bounce") { autoPitch } + private val pitch by c.setting("Pitch", 72.0, -90.0..90.0, 0.000001) { autoPitch && !smartPitch } private val jump by c.setting("Jump", true, "Automatically jumps") private val flagPause by c.setting("FlagPause Pause", 5, 0..100, 1, "How long to pause if the server flags you for a movement check", "ticks") private val minimizePackets by c.setting("Minimize Packets", true, "Shrinks the amount of start fly packets sent to the server as much as possible") @@ -122,7 +123,15 @@ class BounceElytraFly( listen { pauseTimer.tick() - if (autoPitch) rotationRequest { pitch(pitch) }.submit() + if (autoPitch) { + rotationRequest { + when { + !smartPitch -> pitch(pitch) + player.velocity.y > -0.2 -> pitch(90.0) + else -> pitch(4.0) + } + }.submit() + } if (handlePassingObstacles()) return@listen @@ -260,4 +269,4 @@ class BounceElytraFly( original } } == true -} \ No newline at end of file +}