From 105fc8082a59f3bade7a7cf560a9d27c521b4f30 Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Mon, 24 Jul 2023 13:59:47 +0200 Subject: Merge pull request #309 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added text on Killer spring and Blood ichor * twinclaw sound and delay * Merge branch 'beta' of https://github.com/hannibal002/skyhanni into i… * draw line from boss to ichor/spring * changed default color * fixes * fixes * draw line to the boss head if higlighted * Merge branch 'beta' into ichor_spring_text * merge conflicts and more sub configs --- .../at/hannibal2/skyhanni/utils/EntityUtils.kt | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index 30a8025cf..9bfb9e1bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -5,11 +5,9 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth import net.minecraft.block.state.IBlockState import net.minecraft.client.Minecraft -import net.minecraft.client.multiplayer.WorldClient import net.minecraft.entity.Entity import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand -import net.minecraft.entity.monster.EntityBlaze import net.minecraft.entity.monster.EntityEnderman import net.minecraft.entity.player.EntityPlayer import net.minecraft.item.ItemStack @@ -129,20 +127,20 @@ object EntityUtils { } inline fun getEntitiesNextToPlayer(radius: Double): List = - getEntitiesNearby(LocationUtils.playerLocation(), radius) + getEntitiesNearby(LocationUtils.playerLocation(), radius) inline fun getEntitiesNearby(location: LorenzVec, radius: Double): List = - getAllEntities().filterIsInstance().filter { it.distanceTo(location) < radius } + getEntities().filter { it.distanceTo(location) < radius } fun EntityLivingBase.isAtFullHealth() = baseMaxHealth == health.toInt() - fun WorldClient.getEntitiesNearby( - clazz: Class, - location: LorenzVec, - radius: Double - ): MutableList = getEntities(clazz) { entity -> - entity?.getLorenzVec()?.let { it.distance(location) < radius } ?: false - } +// fun WorldClient.getEntitiesNearby( +// clazz: Class, +// location: LorenzVec, +// radius: Double +// ): MutableList = getEntities(clazz) { entity -> +// entity?.getLorenzVec()?.let { it.distance(location) < radius } ?: false +// } fun EntityArmorStand.hasSkullTexture(skin: String): Boolean { if (inventory == null) return false @@ -158,9 +156,9 @@ object EntityUtils { fun EntityEnderman.getBlockInHand(): IBlockState? = heldBlockState - inline fun getEntities(): List = getAllEntities().filterIsInstance() + inline fun getEntities(): List = getAllEntities().filterIsInstance() - inline fun getEntitiesOrNull(): List? = getAllEntitiesOrNull()?.filterIsInstance() + inline fun getEntitiesOrNull(): List? = getAllEntitiesOrNull()?.filterIsInstance() fun getAllEntities(): List = getAllEntitiesOrNull() ?: error("minecraft.world.loadedEntityList is null.") -- cgit