From 608fec9cd0bbe3cf389faaeb7e258b592e3adf14 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 18 Jan 2024 20:00:47 +0100 Subject: Add Nearby Burrow Highlighter --- .../moe/nea/firmament/features/diana/AncestralSpadeSolver.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt') 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 c34e68e..459fa3c 100644 --- a/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt +++ b/src/main/kotlin/moe/nea/firmament/features/diana/AncestralSpadeSolver.kt @@ -13,6 +13,7 @@ import net.minecraft.sound.SoundEvents import net.minecraft.util.math.Vec3d import moe.nea.firmament.events.ParticleSpawnEvent import moe.nea.firmament.events.SoundReceiveEvent +import moe.nea.firmament.events.WorldReadyEvent import moe.nea.firmament.events.WorldRenderLastEvent import moe.nea.firmament.util.TimeMark import moe.nea.firmament.util.render.RenderInWorldContext @@ -28,6 +29,8 @@ object AncestralSpadeSolver { fun onParticleSpawn(event: ParticleSpawnEvent) { if (!DianaWaypoints.TConfig.ancestralSpadeSolver) return if (event.particleEffect != ParticleTypes.DRIPPING_LAVA) return + if (event.offset.x != 0.0F || event.offset.y != 0F || event.offset.z != 0F) + return particlePositions.add(event.position) if (particlePositions.size > 20) { particlePositions.removeFirst() @@ -90,4 +93,11 @@ object AncestralSpadeSolver { } } + fun onSwapWorld(event: WorldReadyEvent) { + nextGuess = null + particlePositions.clear() + pitches.clear() + lastDing = TimeMark.farPast() + } + } -- cgit