Skip to content

Commit 034cf9b

Browse files
committed
automation config for rotation settings in ElytraAltitudeControl
1 parent 88c08c6 commit 034cf9b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
package com.lambda.module.modules.movement
1919

20-
import com.lambda.config.groups.RotationSettings
20+
import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
21+
import com.lambda.config.applyEdits
2122
import com.lambda.event.events.TickEvent
2223
import com.lambda.event.listener.SafeListener.Companion.listen
2324
import com.lambda.interaction.managers.rotating.IRotationRequest.Companion.rotationRequest
@@ -79,8 +80,6 @@ object ElytraAltitudeControl : Module(
7980
val pitch40SpeedThreshold by setting("Speed Threshold", 41f, 10f..100f, .5f, description = "Speed at which to start pitching up") { usePitch40OnHeight }.group(Group.Pitch40Control)
8081
val pitch40UseFireworkOnUpTrajectory by setting("Use Firework On Up Trajectory", false, "Use fireworks when converting speed to altitude in the Pitch 40 maneuver") { usePitch40OnHeight }.group(Group.Pitch40Control)
8182

82-
override val rotationConfig = RotationSettings(this, Group.Rotation)
83-
8483
var controlState = ControlState.AttitudeControl
8584
var state = Pitch40State.GainSpeed
8685
var lastAngle = pitch40UpStartAngle
@@ -90,6 +89,12 @@ object ElytraAltitudeControl : Module(
9089
val usageDelay = Timer()
9190

9291
init {
92+
setDefaultAutomationConfig {
93+
applyEdits {
94+
hideAllGroupsExcept(rotationConfig)
95+
}
96+
}
97+
9398
listen<TickEvent.Pre> {
9499
if (!player.isGliding) return@listen
95100
run {

0 commit comments

Comments
 (0)