aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-25 14:34:29 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-25 14:34:29 +0100
commit62f51fd9f6d4df2914ea69c393fc35f2bb59183b (patch)
tree3bd7b2f7fcf89db72fcbbd5819f35d8f0af22f8e /src/main/java/at/hannibal2/skyhanni
parent7a096c605ee5e7245f6263a6aef8b2757db8e61d (diff)
downloadskyhanni-62f51fd9f6d4df2914ea69c393fc35f2bb59183b.tar.gz
skyhanni-62f51fd9f6d4df2914ea69c393fc35f2bb59183b.tar.bz2
skyhanni-62f51fd9f6d4df2914ea69c393fc35f2bb59183b.zip
Code cleanup.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt37
1 files changed, 28 insertions, 9 deletions
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
}
}