From 3b89042f6576ac1d0c1f9ad317ff0212e4635187 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 20 Jan 2024 20:22:16 +0100 Subject: Fixed close griffin burrow detection with particles failing sometimes. --- .../skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index 04b78d035..a9f9467f8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -10,16 +10,18 @@ import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.TimeLimitedSet import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.init.Blocks import net.minecraft.network.play.server.S2APacketParticles import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.minutes class GriffinBurrowParticleFinder { private val config get() = SkyHanniMod.feature.event.diana - private val recentlyDugParticleBurrows = mutableListOf() + private val recentlyDugParticleBurrows = TimeLimitedSet(1.minutes) private val burrows = mutableMapOf() private var lastDugParticleBurrow: LorenzVec? = null -- cgit