diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-20 20:22:16 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-20 20:22:16 +0100 |
commit | 3b89042f6576ac1d0c1f9ad317ff0212e4635187 (patch) | |
tree | ff35e7cef21746ce9e25454cbc2e67c4cc5754c9 /src | |
parent | 680b20370ad4563f202a08eae5713d0d1d7f9078 (diff) | |
download | skyhanni-3b89042f6576ac1d0c1f9ad317ff0212e4635187.tar.gz skyhanni-3b89042f6576ac1d0c1f9ad317ff0212e4635187.tar.bz2 skyhanni-3b89042f6576ac1d0c1f9ad317ff0212e4635187.zip |
Fixed close griffin burrow detection with particles failing sometimes.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt | 4 |
1 files changed, 3 insertions, 1 deletions
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<LorenzVec>() + private val recentlyDugParticleBurrows = TimeLimitedSet<LorenzVec>(1.minutes) private val burrows = mutableMapOf<LorenzVec, Burrow>() private var lastDugParticleBurrow: LorenzVec? = null |