diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-28 13:09:44 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-28 13:09:44 +0200 |
commit | 7fd0a26af7ecc51af84da9317c7a19d4575bfa1b (patch) | |
tree | 8d1b45febea290f440a7aa6e44290c4c3ca270aa /src/main/java/at/hannibal2/skyhanni/features | |
parent | 7c78c448f52b59dd55dc37234d8d15175772be1a (diff) | |
download | skyhanni-7fd0a26af7ecc51af84da9317c7a19d4575bfa1b.tar.gz skyhanni-7fd0a26af7ecc51af84da9317c7a19d4575bfa1b.tar.bz2 skyhanni-7fd0a26af7ecc51af84da9317c7a19d4575bfa1b.zip |
Added a toggle for the already existing feature ender slayer Laser phase timer in damage indicator
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt | 22 |
1 files changed, 12 insertions, 10 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 157883909..068257d95 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -637,16 +637,18 @@ class DamageIndicatorManager { } //Laser phase - if (entity.ridingEntity != null) { - val ticksAlive = entity.ridingEntity.ticksExisted.toLong() - //TODO more tests, more exact values, better logic? idk make this working perfectly pls - //val remainingTicks = 8 * 20 - ticksAlive - val remainingTicks = (8.9 * 20).toLong() - ticksAlive - - if (config.showHealthDuringLaser) { - entityData.nameSuffix = " §f" + formatDelay(remainingTicks * 50) - } else { - return formatDelay(remainingTicks * 50) + if (config.enderSlayer.laserPhaseTimer) { + if (entity.ridingEntity != null) { + val ticksAlive = entity.ridingEntity.ticksExisted.toLong() + //TODO more tests, more exact values, better logic? idk make this working perfectly pls + //val remainingTicks = 8 * 20 - ticksAlive + val remainingTicks = (8.9 * 20).toLong() - ticksAlive + + if (config.enderSlayer.showHealthDuringLaser) { + entityData.nameSuffix = " §f" + formatDelay(remainingTicks * 50) + } else { + return formatDelay(remainingTicks * 50) + } } } |