|
17 | 17 |
|
18 | 18 | package com.lambda.module.modules.combat |
19 | 19 |
|
20 | | -import com.lambda.config.groups.RotationSettings |
| 20 | +import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig |
| 21 | +import com.lambda.config.applyEdits |
21 | 22 | import com.lambda.config.groups.Targeting |
22 | 23 | import com.lambda.context.SafeContext |
23 | 24 | import com.lambda.event.events.EntityEvent |
@@ -111,9 +112,6 @@ object CrystalAura : Module( |
111 | 112 | /* Targeting */ |
112 | 113 | private val targeting = Targeting.Combat(this, Group.Targeting, 10.0) |
113 | 114 |
|
114 | | - /* Rotation */ |
115 | | - override val rotationConfig = RotationSettings(this, Group.Rotation) |
116 | | - |
117 | 115 | private val blueprint = mutableMapOf<BlockPos, Opportunity>() |
118 | 116 | private var activeOpportunity: Opportunity? = null |
119 | 117 | private var currentTarget: LivingEntity? = null |
@@ -144,6 +142,16 @@ object CrystalAura : Module( |
144 | 142 | } |
145 | 143 |
|
146 | 144 | init { |
| 145 | + setDefaultAutomationConfig { |
| 146 | + applyEdits { |
| 147 | + hideAllGroupsExcept(buildConfig, rotationConfig, hotbarConfig, inventoryConfig) |
| 148 | + buildConfig.apply { |
| 149 | + hide(::pathing, ::stayInRange, ::collectDrops, ::spleefEntities, |
| 150 | + ::maxPendingActions, ::actionTimeout, ::maxBuildDependencies, ::breakBlocks, ::interactBlocks) |
| 151 | + } |
| 152 | + } |
| 153 | + } |
| 154 | + |
147 | 155 | // Async ticking |
148 | 156 | fixedRateTimer( |
149 | 157 | name = "Crystal Aura Thread", |
@@ -476,6 +484,7 @@ object CrystalAura : Module( |
476 | 484 | val crystalSlot = player.hotbarStacks.indexOfFirst { selection.filterStack(it) } |
477 | 485 | if (crystalSlot != -1) { |
478 | 486 | if (!HotbarRequest(crystalSlot, this).submit().done) return@runSafe |
| 487 | + else return@runSafeAutomated |
479 | 488 | } |
480 | 489 | val swapTo = when (swapHand) { Hand.MAIN_HAND -> HotbarContainer; Hand.OFF_HAND -> OffHandContainer } |
481 | 490 | if (!selection.transfer(swapTo)) return@runSafe |
|
0 commit comments