summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
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/mining
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/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
index 42c796c5a..45614b3dc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
@@ -7,10 +7,10 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
import at.hannibal2.skyhanni.events.withAlpha
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
-import net.minecraft.client.Minecraft
import net.minecraft.entity.EntityLivingBase
import net.minecraft.entity.monster.EntityEndermite
import net.minecraft.entity.monster.EntityIronGolem
@@ -48,7 +48,7 @@ class HighlightMiningCommissionMobs {
if (!isEnabled()) return
if (!event.isMod(40)) return
- val entities = Minecraft.getMinecraft().theWorld.loadedEntityList.filterIsInstance<EntityLivingBase>()
+ val entities = EntityUtils.getAllEntities<EntityLivingBase>()
for ((type, entity) in active.flatMap { type -> entities.map { type to it } }) {
if (type.isMob(entity)) {
RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.YELLOW.toColor().withAlpha(127))