Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ 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 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")
Expand Down Expand Up @@ -122,7 +123,11 @@ class BounceElytraFly(
listen<TickEvent.Pre> {
pauseTimer.tick()

if (autoPitch) rotationRequest { pitch(pitch) }.submit()
if (autoPitch) {
// straight down while rising ,shallow once falling, makes for faster bouncing
if (smartPitch) rotationRequest { pitch(if (player.velocity.y > -0.2) 90.0 else 4.0) }.submit()
else rotationRequest { pitch(pitch) }.submit()
}

if (handlePassingObstacles()) return@listen

Expand Down Expand Up @@ -260,4 +265,4 @@ class BounceElytraFly(
original
}
} == true
}
}