From 62f51fd9f6d4df2914ea69c393fc35f2bb59183b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 25 Jan 2023 14:34:29 +0100 Subject: Code cleanup. --- .../damageindicator/DamageIndicatorManager.kt | 37 ++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt index 40d96104e..a18329f13 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -161,15 +161,16 @@ class DamageIndicatorManager { } } - val partialTicks = event.partialTicks +// val partialTicks = event.partialTicks val location = if (data.dead && data.deathLocation != null) { data.deathLocation!! } else { - val loc = LorenzVec( - RenderUtils.interpolate(entity.posX, entity.lastTickPosX, partialTicks), - RenderUtils.interpolate(entity.posY, entity.lastTickPosY, partialTicks) + 0.5f, - RenderUtils.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks) - ) + val loc = entity.getLorenzVec() +// val loc = LorenzVec( +// RenderUtils.interpolate(entity.posX, entity.lastTickPosX, partialTicks), +// RenderUtils.interpolate(entity.posY, entity.lastTickPosY, partialTicks) + 0.5f, +// RenderUtils.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks) +// ) if (data.dead) data.deathLocation = loc loc }.add(-0.5, 0.0, -0.5) @@ -178,7 +179,13 @@ class DamageIndicatorManager { event.drawDynamicText(location, healthText, sizeHealth, smallestDistanceVew = smallestDistanceVew) if (data.nameAbove.isNotEmpty()) { - event.drawDynamicText(location, data.nameAbove, sizeNameAbove, -18f, smallestDistanceVew = smallestDistanceVew) + event.drawDynamicText( + location, + data.nameAbove, + sizeNameAbove, + -18f, + smallestDistanceVew = smallestDistanceVew + ) } var bossName = when (SkyHanniMod.feature.damageIndicator.bossName) { @@ -210,7 +217,13 @@ class DamageIndicatorManager { } else { "$formatDamage §7/ $formatHealing" } - event.drawDynamicText(location, finalResult, sizeFinalResults, diff, smallestDistanceVew = smallestDistanceVew) + event.drawDynamicText( + location, + finalResult, + sizeFinalResults, + diff, + smallestDistanceVew = smallestDistanceVew + ) diff += 9f } for (damage in data.damageCounter.oldDamages) { @@ -223,7 +236,13 @@ class DamageIndicatorManager { } else { "$formatDamage §7/ $formatHealing" } - event.drawDynamicText(location, finalResult, sizeFinalResults, diff, smallestDistanceVew = smallestDistanceVew) + event.drawDynamicText( + location, + finalResult, + sizeFinalResults, + diff, + smallestDistanceVew = smallestDistanceVew + ) diff += 9f } } -- cgit