diff options
Diffstat (limited to 'src/main/kotlin/features/diana/DianaWaypoints.kt')
-rw-r--r-- | src/main/kotlin/features/diana/DianaWaypoints.kt | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/main/kotlin/features/diana/DianaWaypoints.kt b/src/main/kotlin/features/diana/DianaWaypoints.kt index 0a34eaa..205e237 100644 --- a/src/main/kotlin/features/diana/DianaWaypoints.kt +++ b/src/main/kotlin/features/diana/DianaWaypoints.kt @@ -1,14 +1,8 @@ - package moe.nea.firmament.features.diana +import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.AttackBlockEvent -import moe.nea.firmament.events.ParticleSpawnEvent -import moe.nea.firmament.events.ProcessChatEvent -import moe.nea.firmament.events.SoundReceiveEvent import moe.nea.firmament.events.UseBlockEvent -import moe.nea.firmament.events.WorldKeyboardEvent -import moe.nea.firmament.events.WorldReadyEvent -import moe.nea.firmament.events.WorldRenderLastEvent import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig @@ -22,13 +16,15 @@ object DianaWaypoints : FirmamentFeature { val nearbyWaypoints by toggle("nearby-waypoints") { true } } - override fun onLoad() { - UseBlockEvent.subscribe { - NearbyBurrowsSolver.onBlockClick(it.hitResult.blockPos) - } - AttackBlockEvent.subscribe { - NearbyBurrowsSolver.onBlockClick(it.blockPos) - } + + @Subscribe + fun onBlockUse(event: UseBlockEvent) { + NearbyBurrowsSolver.onBlockClick(event.hitResult.blockPos) + } + + @Subscribe + fun onBlockAttack(event: AttackBlockEvent) { + NearbyBurrowsSolver.onBlockClick(event.blockPos) } } |