diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-26 21:49:21 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-26 21:49:21 +0200 |
commit | 637506306077e4df63c7aef30a37eb8ad27c06f4 (patch) | |
tree | 23c4b66d13d893abdc3a632633880ac611aef2cd /src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt | |
parent | ddbf374e9302ae47d43aa981c0caf33a264b2496 (diff) | |
download | skyhanni-637506306077e4df63c7aef30a37eb8ad27c06f4.tar.gz skyhanni-637506306077e4df63c7aef30a37eb8ad27c06f4.tar.bz2 skyhanni-637506306077e4df63c7aef30a37eb8ad27c06f4.zip |
fixing bug that wrong entities get counted as summoning mobs
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt index 5dca40d1b..5b31248d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt @@ -95,10 +95,12 @@ class SummoningMobManager { it is EntityLiving && it !in summoningMobs.keys && it.getLorenzVec().distance(playerLocation) < 3 } .forEach { - summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") - updateData() - if (summoningMobs.size == summoningsSpawned) { - searchMobs = false + if (it.ticksExisted == 0) { + summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") + updateData() + if (summoningMobs.size == summoningsSpawned) { + searchMobs = false + } } } } |