summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/chat
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-23 23:45:24 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-23 23:45:24 +0200
commitf43bac23acf79325f9f4de060b69c5c0b1d870eb (patch)
treef05971f36500a18091762a4b29f0b0415c25558f /src/main/java/at/hannibal2/skyhanni/features/chat
parenta21c3298d2ae7790b3d3770ee4a135c1817f3018 (diff)
downloadskyhanni-f43bac23acf79325f9f4de060b69c5c0b1d870eb.tar.gz
skyhanni-f43bac23acf79325f9f4de060b69c5c0b1d870eb.tar.bz2
skyhanni-f43bac23acf79325f9f4de060b69c5c0b1d870eb.zip
Using EntityUtils.getEntities everywhere
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
index 2bfb0c9cf..33e6fdd25 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
@@ -3,12 +3,12 @@ package at.hannibal2.skyhanni.features.chat
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
+import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.getLorenzVec
-import net.minecraft.client.Minecraft
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -57,8 +57,7 @@ class PlayerDeathMessages {
private fun checkOtherPlayers() {
val location = LocationUtils.playerLocation()
- for (otherPlayer in Minecraft.getMinecraft().theWorld.loadedEntityList
- .filterIsInstance<EntityOtherPlayerMP>()
+ for (otherPlayer in EntityUtils.getAllEntities<EntityOtherPlayerMP>()
.filter { it.getLorenzVec().distance(location) < 25 }) {
lastTimePlayerSeen[otherPlayer.name] = System.currentTimeMillis()
}