File tree Expand file tree Collapse file tree
src/main/kotlin/com/lambda/module/modules/movement Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,12 +219,20 @@ object ElytraFly : Module(
219219 if (passObstacles && validDistanceFromStart) run obstacleChecks@{
220220 val snappedDir = getSnappedDir()
221221 val closestLinePoint = playerPos.findClosestPointOnLine(snappedDir)
222+
222223 passingToPos?.let { passingTo ->
223224 if (passingTo.isObstructed(snappedDir)) {
224225 pathToValidPoint(passingTo, snappedDir)
225226 }
226227 return
227228 }
229+
230+ val notProgressing = Speedometer .calculateSpeed(true , SpeedUnit .BlocksPerSecond ) < 0.01
231+ if (player.isGliding && notProgressing) {
232+ pathToValidPoint(closestLinePoint, snappedDir)
233+ return
234+ }
235+
228236 // We only want to account for horizontal and below the line rather than total
229237 // distance as jumping from bounce might cause false positives
230238 val distanceToLine =
@@ -276,6 +284,7 @@ object ElytraFly : Module(
276284
277285 context(safeContext: SafeContext )
278286 private fun pathToValidPoint (startSearchPos : Vec3d , dir : Vec3d , initialBlockedCheck : Boolean = false) {
287+ if (! safeContext.player.isOnGround) return
279288 var skippingFirstCheck = ! initialBlockedCheck
280289 var searchPos = startSearchPos
281290 while (skippingFirstCheck || searchPos.isObstructed(dir)) {
You can’t perform that action at this time.
0 commit comments