diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-04 23:48:40 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-04 23:48:40 +0200 |
commit | fb1961bf83d39708bae4119d4207411d1f733517 (patch) | |
tree | f2e9464739b025be1e0b028d255a3e1317ee0b5e /src | |
parent | d4601b3221833e964bffdd508ebf69109e3480df (diff) | |
parent | 54af9243d1d98e165e06c3db304649154e843132 (diff) | |
download | skyhanni-fb1961bf83d39708bae4119d4207411d1f733517.tar.gz skyhanni-fb1961bf83d39708bae4119d4207411d1f733517.tar.bz2 skyhanni-fb1961bf83d39708bae4119d4207411d1f733517.zip |
Merge remote-tracking branch 'origin/beta' into beta
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 5440c2af8..55b893938 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.makeSyncMap import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine import at.hannibal2.skyhanni.utils.RenderUtils.drawColor @@ -22,7 +23,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class GriffinBurrowHelper { private var guessLocation: LorenzVec? = null - private var particleBurrows = mutableMapOf<LorenzVec, BurrowType>() + private val particleBurrows = makeSyncMap(mutableMapOf<LorenzVec, BurrowType>()) private var animationLocation: LorenzVec? = null private var lastDug: LorenzVec? = null private var teleportedLocation: LorenzVec? = null diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 84807dcca..fbb0272f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -262,4 +262,6 @@ object LorenzUtils { fun <T> Property<out T>.onToggle(observer: Runnable) { whenChanged { _, _ -> observer.run() } } + + fun <K, V> makeSyncMap(originalMap: MutableMap<K, V>) = Collections.synchronizedMap(originalMap) }
\ No newline at end of file |