aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-18 12:39:50 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-18 12:39:50 +0100
commit4a4657888afc19f7c234436fc8b5084aada466d8 (patch)
treeccfa69585976c92e5ddaf8fb71e48ad2dd12dcb2 /src/main/java
parent623141417d9c0e261b67227f743dc5c98bf99094 (diff)
downloadskyhanni-4a4657888afc19f7c234436fc8b5084aada466d8.tar.gz
skyhanni-4a4657888afc19f7c234436fc8b5084aada466d8.tar.bz2
skyhanni-4a4657888afc19f7c234436fc8b5084aada466d8.zip
Code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt17
1 files changed, 9 insertions, 8 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 729c4f85b..06904d860 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
@@ -40,6 +40,7 @@ class DamageIndicatorManager {
private var mobFinder: MobFinder? = null
private val maxHealth = mutableMapOf<UUID, Long>()
+ private val config get() = SkyHanniMod.feature.damageIndicator
companion object {
private var data = mutableMapOf<UUID, EntityData>()
@@ -144,7 +145,7 @@ class DamageIndicatorManager {
if (!data.ignoreBlocks) {
if (!player.canEntityBeSeen(data.entity)) continue
}
- if (data.bossType.bossTypeToggle !in SkyHanniMod.feature.damageIndicator.bossesToShow) continue
+ if (data.bossType.bossTypeToggle !in config.bossesToShow) continue
val entity = data.entity
@@ -184,7 +185,7 @@ class DamageIndicatorManager {
)
}
- var bossName = when (SkyHanniMod.feature.damageIndicator.bossName) {
+ var bossName = when (config.bossName) {
0 -> ""
1 -> data.bossType.fullName
2 -> data.bossType.shortName
@@ -199,7 +200,7 @@ class DamageIndicatorManager {
}
event.drawDynamicText(location, bossName, sizeBossName, -9f, smallestDistanceVew = smallestDistanceVew)
- if (SkyHanniMod.feature.damageIndicator.showDamageOverTime) {
+ if (config.showDamageOverTime) {
var diff = 13f
val currentDamage = data.damageCounter.currentDamage
val currentHealing = data.damageCounter.currentHealing
@@ -329,7 +330,7 @@ class DamageIndicatorManager {
entityData.nameAbove = ""
val customHealthText = if (health == 0L) {
entityData.dead = true
- if (entityData.bossType.showDeathTime && SkyHanniMod.feature.damageIndicator.timeToKillSlayer) {
+ if (entityData.bossType.showDeathTime && config.timeToKillSlayer) {
entityData.nameAbove = entityData.timeToKill
}
"§cDead"
@@ -626,7 +627,7 @@ class DamageIndicatorManager {
//val remainingTicks = 8 * 20 - ticksAlive
val remainingTicks = (8.9 * 20).toLong() - ticksAlive
- if (SkyHanniMod.feature.damageIndicator.showHealthDuringLaser) {
+ if (config.showHealthDuringLaser) {
entityData.nameSuffix = " §f" + formatDelay(remainingTicks * 50)
} else {
return formatDelay(remainingTicks * 50)
@@ -754,7 +755,7 @@ class DamageIndicatorManager {
val name = entity.customNameTag.removeColor().replace(",", "")
if (entityData != null) {
- if (SkyHanniMod.feature.damageIndicator.hideDamageSplash) {
+ if (config.hideDamageSplash) {
event.isCanceled = true
}
if (entityData.bossType == BossType.DUMMY) {
@@ -768,7 +769,7 @@ class DamageIndicatorManager {
} else {
if (entityData != null) {
if (isEnabled()) {
- if (SkyHanniMod.feature.damageIndicator.hideVanillaNametag) {
+ if (config.hideVanillaNametag) {
val name = entity.name
if (name.contains("Plaesmaflux")) return
if (name.contains("Overflux")) return
@@ -782,6 +783,6 @@ class DamageIndicatorManager {
}
fun isEnabled(): Boolean {
- return LorenzUtils.inSkyBlock && SkyHanniMod.feature.damageIndicator.enabled
+ return LorenzUtils.inSkyBlock && config.enabled
}
} \ No newline at end of file