Skip to content

Commit 4e0bb71

Browse files
committed
update elytra altitude control to only request pitch
1 parent 202d4fc commit 4e0bb71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/com/lambda/module/modules/movement/ElytraAltitudeControl.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ object ElytraAltitudeControl : Module(
113113
-1 * altitudeController.getOutput(targetAltitude.toDouble(), player.y) // Negative because in minecraft pitch > 0 is looking down not up
114114
}
115115
}.coerceIn(-maxPitchAngle, maxPitchAngle)
116-
rotationRequest { rotation(player.yaw, outputPitch.toFloat()) }.submit()
116+
rotationRequest { pitch(outputPitch) }.submit()
117117

118118
if (usageDelay.timePassed(2.seconds) && !player.hasFirework) {
119119
if (useFireworkOnHeight && minHeight > player.y) {
@@ -132,14 +132,14 @@ object ElytraAltitudeControl : Module(
132132
}
133133
ControlState.Pitch40Fly -> when (state) {
134134
Pitch40State.GainSpeed -> {
135-
rotationRequest { rotation(player.yaw, pitch40DownAngle) }.submit()
135+
rotationRequest { pitch(pitch40DownAngle) }.submit()
136136
if (player.flySpeed() > pitch40SpeedThreshold) {
137137
state = Pitch40State.PitchUp
138138
}
139139
}
140140
Pitch40State.PitchUp -> {
141141
lastAngle -= 5f
142-
rotationRequest { rotation(player.yaw, lastAngle) }.submit()
142+
rotationRequest { pitch(lastAngle) }.submit()
143143
if (lastAngle <= pitch40UpStartAngle) {
144144
state = Pitch40State.FlyUp
145145
if (pitch40UseFireworkOnUpTrajectory) {
@@ -151,7 +151,7 @@ object ElytraAltitudeControl : Module(
151151
}
152152
Pitch40State.FlyUp -> {
153153
lastAngle += pitch40AngleChangeRate
154-
rotationRequest { rotation(player.yaw, lastAngle) }.submit()
154+
rotationRequest { pitch(lastAngle) }.submit()
155155
if (lastAngle >= 0f) {
156156
state = Pitch40State.GainSpeed
157157
if (logHeightGain) {

0 commit comments

Comments
 (0)