From f43bac23acf79325f9f4de060b69c5c0b1d870eb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 23 Jul 2023 23:45:24 +0200 Subject: Using EntityUtils.getEntities everywhere --- .../java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat') 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() + for (otherPlayer in EntityUtils.getAllEntities() .filter { it.getLorenzVec().distance(location) < 25 }) { lastTimePlayerSeen[otherPlayer.name] = System.currentTimeMillis() } -- cgit