diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt index 5a23ee650..e96ae7e31 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled -import at.hannibal2.skyhanni.utils.EntityUtils.getEntitiesNearby +import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.EntityUtils.isAtFullHealth import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy @@ -16,7 +16,6 @@ import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.getLorenzVec -import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.util.EnumParticleTypes import net.minecraftforge.client.event.RenderWorldLastEvent @@ -78,8 +77,7 @@ class LivingCaveDefenseBlocks { if (entity == null) { // read new entity data val compareLocation = event.location.add(-0.5, -1.5, -0.5) - entity = - Minecraft.getMinecraft().theWorld.getEntitiesNearby<EntityOtherPlayerMP>(compareLocation, 2.0) + entity = EntityUtils.getEntitiesNearby<EntityOtherPlayerMP>(compareLocation, 2.0) .filter { isCorrectMob(it.name) } .filter { !it.isAtFullHealth() } .minByOrNull { it.distanceTo(compareLocation) } |