diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-08-27 17:34:58 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-08-27 17:34:58 +0200 |
commit | a956fe9546b746bbd171f5e33d3c1089112f86b2 (patch) | |
tree | ac87cf6afed49c3481f2477f51e579265a15e160 /src/main/java/at/hannibal2/skyhanni | |
parent | 37e1cd336d8f32913b99969941b8fc7a836d77e4 (diff) | |
download | skyhanni-a956fe9546b746bbd171f5e33d3c1089112f86b2.tar.gz skyhanni-a956fe9546b746bbd171f5e33d3c1089112f86b2.tar.bz2 skyhanni-a956fe9546b746bbd171f5e33d3c1089112f86b2.zip |
deprecate old entity detection logic
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index d123fa991..c3d3d248f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -41,15 +41,14 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object EntityUtils { + @Deprecated("Old. Instead use entity detection feature instead.") fun EntityLivingBase.hasNameTagWith( y: Int, contains: String, debugRightEntity: Boolean = false, inaccuracy: Double = 1.6, debugWrongEntity: Boolean = false, - ): Boolean { - return getNameTagWith(y, contains, debugRightEntity, inaccuracy, debugWrongEntity) != null - } + ): Boolean = getNameTagWith(y, contains, debugRightEntity, inaccuracy, debugWrongEntity) != null fun getPlayerEntities(): MutableList<EntityOtherPlayerMP> { val list = mutableListOf<EntityOtherPlayerMP>() @@ -68,6 +67,7 @@ object EntityUtils { it.getNameAsString().contains(contains) } + @Deprecated("Old. Instead use entity detection feature instead.") fun EntityLivingBase.getNameTagWith( y: Int, contains: String, @@ -76,6 +76,7 @@ object EntityUtils { debugWrongEntity: Boolean = false, ): EntityArmorStand? = getAllNameTagsWith(y, contains, debugRightEntity, inaccuracy, debugWrongEntity).firstOrNull() + @Deprecated("Old. Instead use entity detection feature instead.") fun EntityLivingBase.getAllNameTagsWith( y: Int, contains: String, @@ -107,9 +108,10 @@ object EntityUtils { return worldObj.getEntitiesWithinAABB(clazz, alignedBB) } + @Deprecated("Old. Instead use entity detection feature instead.") fun EntityLivingBase.hasBossHealth(health: Int): Boolean = this.hasMaxHealth(health, true) - // TODO remove baseMaxHealth + @Deprecated("Old. Instead use entity detection feature instead.") fun EntityLivingBase.hasMaxHealth(health: Int, boss: Boolean = false, maxHealth: Int = baseMaxHealth): Boolean { val derpyMultiplier = if (LorenzUtils.isDerpy) 2 else 1 if (maxHealth == health * derpyMultiplier) return true |