diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt b/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt index 039750d..39ca6d3 100644 --- a/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt +++ b/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt @@ -13,11 +13,14 @@ 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 object AncestralSpadeSolver : SubscriptionOwner { var lastDing = TimeMark.farPast() @@ -27,10 +30,13 @@ object AncestralSpadeSolver : SubscriptionOwner { var nextGuess: Vec3d? = null private set + val ancestralSpadeId = SkyblockId("ANCESTRAL_SPADE") private var lastTeleportAttempt = TimeMark.farPast() fun isEnabled() = - DianaWaypoints.TConfig.ancestralSpadeSolver && SBData.skyblockLocation == SkyBlockIsland.HUB + DianaWaypoints.TConfig.ancestralSpadeSolver + && SBData.skyblockLocation == SkyBlockIsland.HUB + && MC.player?.inventory?.containsAny { it.skyBlockId == ancestralSpadeId } == true // TODO: add a reactive property here @Subscribe fun onKeyBind(event: WorldKeyboardEvent) { |