diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-11 22:25:52 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-11 22:25:52 +0200 |
commit | 8b152bcddf4a99a64bda5974fefe1d50cc0a8f19 (patch) | |
tree | 7829ed86b68065b85551ca1669a5c64fd06b6b24 | |
parent | 3948cac80fe43683e12d8fa8d4f1058512eed853 (diff) | |
download | skyhanni-8b152bcddf4a99a64bda5974fefe1d50cc0a8f19.tar.gz skyhanni-8b152bcddf4a99a64bda5974fefe1d50cc0a8f19.tar.bz2 skyhanni-8b152bcddf4a99a64bda5974fefe1d50cc0a8f19.zip |
Fixed summoning mobs display don't track mobs when moving too fast while spawning summoning mobs
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt | 26 |
2 files changed, 12 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b45f7edda..e83c7c1fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Fixed enchanted books in bazaar - Fixed LorenzLogger printing output into console - Fixed best sell method not working for some bazaar items +- Fixed summoning mobs display don't track mobs when moving too fast while spawning summoning mobs ## Version 0.7 - Dungeon and Colored Highlight diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt index 03d9382d1..99cd8615f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt @@ -81,8 +81,7 @@ class SummoningMobManager { } if (searchArmorStands) { - Minecraft.getMinecraft().theWorld.loadedEntityList - .filter { it is EntityArmorStand && it !in summoningMobNametags } + Minecraft.getMinecraft().theWorld.loadedEntityList.filter { it is EntityArmorStand && it !in summoningMobNametags } .forEach { val name = it.displayName.unformattedText val matcher = healthPattern.matcher(name) @@ -97,22 +96,19 @@ class SummoningMobManager { } } } - if (searchMobs) { + if (searchMobs) { val playerLocation = LocationUtils.playerLocation() - Minecraft.getMinecraft().theWorld.loadedEntityList - .filter { - it is EntityLiving && it !in summoningMobs.keys && it.getLorenzVec().distance(playerLocation) < 3 - } - .forEach { - if (it.ticksExisted < 2) { - summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") - updateData() - if (summoningMobs.size == summoningsSpawned) { - searchMobs = false - } - } + Minecraft.getMinecraft().theWorld.loadedEntityList.filter { + it is EntityLiving && it !in summoningMobs.keys && it.getLorenzVec() + .distance(playerLocation) < 10 && it.ticksExisted < 2 + }.forEach { + summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") + updateData() + if (summoningMobs.size == summoningsSpawned) { + searchMobs = false } + } } } |