aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/diana
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features/diana')
-rw-r--r--src/main/kotlin/features/diana/AncestralSpadeSolver.kt9
-rw-r--r--src/main/kotlin/features/diana/DianaWaypoints.kt38
-rw-r--r--src/main/kotlin/features/diana/NearbyBurrowsSolver.kt7
3 files changed, 20 insertions, 34 deletions
diff --git a/src/main/kotlin/features/diana/AncestralSpadeSolver.kt b/src/main/kotlin/features/diana/AncestralSpadeSolver.kt
index 48004e8..a2869f0 100644
--- a/src/main/kotlin/features/diana/AncestralSpadeSolver.kt
+++ b/src/main/kotlin/features/diana/AncestralSpadeSolver.kt
@@ -10,19 +10,16 @@ import moe.nea.firmament.events.SoundReceiveEvent
import moe.nea.firmament.events.WorldKeyboardEvent
import moe.nea.firmament.events.WorldReadyEvent
import moe.nea.firmament.events.WorldRenderLastEvent
-import moe.nea.firmament.events.subscription.SubscriptionOwner
-import moe.nea.firmament.features.FirmamentFeature
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.SBData
import moe.nea.firmament.util.SkyBlockIsland
-import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.TimeMark
import moe.nea.firmament.util.WarpUtil
import moe.nea.firmament.util.render.RenderInWorldContext
import moe.nea.firmament.util.skyBlockId
import moe.nea.firmament.util.skyblock.SkyBlockItems
-object AncestralSpadeSolver : SubscriptionOwner {
+object AncestralSpadeSolver {
var lastDing = TimeMark.farPast()
private set
private val pitches = mutableListOf<Float>()
@@ -122,8 +119,4 @@ object AncestralSpadeSolver : SubscriptionOwner {
pitches.clear()
lastDing = TimeMark.farPast()
}
-
- override val delegateFeature: FirmamentFeature
- get() = DianaWaypoints
-
}
diff --git a/src/main/kotlin/features/diana/DianaWaypoints.kt b/src/main/kotlin/features/diana/DianaWaypoints.kt
index 68ee1ea..650e6f9 100644
--- a/src/main/kotlin/features/diana/DianaWaypoints.kt
+++ b/src/main/kotlin/features/diana/DianaWaypoints.kt
@@ -3,31 +3,29 @@ package moe.nea.firmament.features.diana
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.AttackBlockEvent
import moe.nea.firmament.events.UseBlockEvent
-import moe.nea.firmament.features.FirmamentFeature
import moe.nea.firmament.util.data.Config
import moe.nea.firmament.util.data.ManagedConfig
-object DianaWaypoints : FirmamentFeature {
- override val identifier get() = "diana"
- override val config get() = TConfig
+object DianaWaypoints {
+ val identifier get() = "diana"
@Config
- object TConfig : ManagedConfig(identifier, Category.EVENTS) {
- val ancestralSpadeSolver by toggle("ancestral-spade") { true }
- val ancestralSpadeTeleport by keyBindingWithDefaultUnbound("ancestral-teleport")
- val nearbyWaypoints by toggle("nearby-waypoints") { true }
- }
-
-
- @Subscribe
- fun onBlockUse(event: UseBlockEvent) {
- NearbyBurrowsSolver.onBlockClick(event.hitResult.blockPos)
- }
-
- @Subscribe
- fun onBlockAttack(event: AttackBlockEvent) {
- NearbyBurrowsSolver.onBlockClick(event.blockPos)
- }
+ object TConfig : ManagedConfig(identifier, Category.EVENTS) {
+ val ancestralSpadeSolver by toggle("ancestral-spade") { true }
+ val ancestralSpadeTeleport by keyBindingWithDefaultUnbound("ancestral-teleport")
+ val nearbyWaypoints by toggle("nearby-waypoints") { true }
+ }
+
+
+ @Subscribe
+ fun onBlockUse(event: UseBlockEvent) {
+ NearbyBurrowsSolver.onBlockClick(event.hitResult.blockPos)
+ }
+
+ @Subscribe
+ fun onBlockAttack(event: AttackBlockEvent) {
+ NearbyBurrowsSolver.onBlockClick(event.blockPos)
+ }
}
diff --git a/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt b/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
index 2fb4002..e1fb856 100644
--- a/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
+++ b/src/main/kotlin/features/diana/NearbyBurrowsSolver.kt
@@ -11,13 +11,11 @@ import moe.nea.firmament.events.ParticleSpawnEvent
import moe.nea.firmament.events.ProcessChatEvent
import moe.nea.firmament.events.WorldReadyEvent
import moe.nea.firmament.events.WorldRenderLastEvent
-import moe.nea.firmament.events.subscription.SubscriptionOwner
-import moe.nea.firmament.features.FirmamentFeature
import moe.nea.firmament.util.TimeMark
import moe.nea.firmament.util.collections.mutableMapWithMaxSize
import moe.nea.firmament.util.render.RenderInWorldContext.Companion.renderInWorld
-object NearbyBurrowsSolver : SubscriptionOwner {
+object NearbyBurrowsSolver {
private val recentlyDugBurrows: MutableMap<BlockPos, TimeMark> = mutableMapWithMaxSize(20)
@@ -134,9 +132,6 @@ object NearbyBurrowsSolver : SubscriptionOwner {
burrows.remove(blockPos)
lastBlockClick = blockPos
}
-
- override val delegateFeature: FirmamentFeature
- get() = DianaWaypoints
}
fun Position.toBlockPos(): BlockPos {