aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-01 01:02:17 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-01 01:02:17 +0200
commit4a74d19f58fad20c3243f95d254e9f6d41994950 (patch)
treeeba867831ed3ac97f20a076554001468364c709d /src/main/java
parent3ba93ef8d4bed6043f2952e8e6a15a396a45d585 (diff)
downloadskyhanni-4a74d19f58fad20c3243f95d254e9f6d41994950.tar.gz
skyhanni-4a74d19f58fad20c3243f95d254e9f6d41994950.tar.bz2
skyhanni-4a74d19f58fad20c3243f95d254e9f6d41994950.zip
Fixed ConcurrentModificationException
at VampireSlayerFeatures
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt
index c4ab2bac4..f5b85b1ba 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt
@@ -33,7 +33,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
object VampireSlayerFeatures {
-
private val config get() = SkyHanniMod.feature.slayer.vampireSlayerConfig
private val configOwnBoss get() = config.ownBoss
private val configOtherBoss get() = config.othersBoss
@@ -43,7 +42,7 @@ object VampireSlayerFeatures {
private val entityList = mutableListOf<EntityLivingBase>()
private val taggedEntityList = mutableListOf<Int>()
- private val standList = mutableMapOf<EntityArmorStand, EntityOtherPlayerMP>()
+ private var standList = mapOf<EntityArmorStand, EntityOtherPlayerMP>()
private val username get() = LorenzUtils.getPlayerName()
private val bloodIchorTexture =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzAzNDA5MjNhNmRlNDgyNWExNzY4MTNkMTMzNTAzZWZmMTg2ZGIwODk2ZTMyYjY3MDQ5MjhjMmEyYmY2ODQyMiJ9fX0="
@@ -338,7 +337,7 @@ object VampireSlayerFeatures {
fun onWorldChange(event: LorenzWorldChangeEvent) {
entityList.clear()
taggedEntityList.clear()
- standList.clear()
+ standList = mutableMapOf()
}
@@ -351,7 +350,7 @@ object VampireSlayerFeatures {
if (event.type == EnumParticleTypes.ENCHANTMENT_TABLE) {
EntityUtils.getEntitiesNearby<EntityArmorStand>(event.location, 3.0).forEach { stand ->
if (stand.hasSkullTexture(killerSpringTexture) || stand.hasSkullTexture(bloodIchorTexture)) {
- standList[stand] = it
+ standList = standList.editCopy { this[stand] = it }
}
}
}