@@ -69,6 +69,7 @@ class BounceElytraFly(
6969 private val takeoff by c.setting(" Takeoff" , true , " Automatically jumps and initiates gliding" )
7070 private val autoPitch by c.setting(" Auto Pitch" , true , " Automatically pitches the players rotation down to bounce at faster speeds" )
7171 private val pitch by c.setting(" Pitch" , 72.0 , - 90.0 .. 90.0 , 0.000001 ) { autoPitch }
72+ private val smartPitch by c.setting(" Smart" , false , " Calculates the best pitch for bounce" ) { autoPitch }
7273 private val jump by c.setting(" Jump" , true , " Automatically jumps" )
7374 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" )
7475 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(
122123 listen<TickEvent .Pre > {
123124 pauseTimer.tick()
124125
125- if (autoPitch) rotationRequest { pitch(pitch) }.submit()
126+ if (autoPitch) {
127+ // straight down while rising ,shallow once falling, makes for faster bouncing
128+ val targetPitch = when {
129+ ! smartPitch -> pitch
130+ player.velocity.y > - 0.2 -> 90.0
131+ else -> 4.0
132+ }
133+ rotationRequest { pitch(targetPitch) }.submit()
134+ }
126135
127136 if (handlePassingObstacles()) return @listen
128137
@@ -260,4 +269,4 @@ class BounceElytraFly(
260269 original
261270 }
262271 } == true
263- }
272+ }
0 commit comments