aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicatorConfig.java25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt22
2 files changed, 31 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicatorConfig.java
index 099b2c3c4..ddcca5eba 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicatorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/DamageIndicatorConfig.java
@@ -73,11 +73,6 @@ public class DamageIndicatorConfig {
public boolean showDamageOverTime = false;
@Expose
- @ConfigOption(name = "Health During Laser", desc = "Show the health of Voidgloom Seraph 4 during the laser phase.")
- @ConfigEditorBoolean
- public boolean showHealthDuringLaser = false;
-
- @Expose
@ConfigOption(name = "Hide Nametag", desc = "Hide the vanilla nametag of damage indicator bosses.")
@ConfigEditorBoolean
public boolean hideVanillaNametag = false;
@@ -89,9 +84,27 @@ public class DamageIndicatorConfig {
@Expose
+ @ConfigOption(name = "Ender Slayer", desc = "")
+ @Accordion
+ public EnderSlayerConfig enderSlayer = new EnderSlayerConfig();
+
+ public static class EnderSlayerConfig {
+
+ @Expose
+ @ConfigOption(name = "Laser phase timer", desc = "Show a timer when the laser phase will end.")
+ @ConfigEditorBoolean
+ public boolean laserPhaseTimer = false;
+
+ @Expose
+ @ConfigOption(name = "Health During Laser", desc = "Show the health of Voidgloom Seraph 4 during the laser phase.")
+ @ConfigEditorBoolean
+ public boolean showHealthDuringLaser = false;
+ }
+
+ @Expose
@ConfigOption(name = "Vampire Slayer", desc = "")
@Accordion
- public VampireSlayerConfig vampireSlayer = new VampireSlayerConfig();
+ public DamageIndicatorConfig.VampireSlayerConfig vampireSlayer = new DamageIndicatorConfig.VampireSlayerConfig();
public static class VampireSlayerConfig {
@Expose
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)
+ }
}
}