From b5df27751269c372191dc26491121eb052138e03 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 30 Jan 2021 15:51:02 +0900 Subject: boss health update --- .../syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java index 7bb0c43f..229c4251 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java @@ -26,6 +26,7 @@ public class FeatureBossHealth extends GuiFeature { parameters.put("color", new FeatureParameter("color", "Color", "Color of text", Color.orange, "color")); parameters.put("totalHealth", new FeatureParameter("totalHealth", "show total health", "Show total health along with current health", false, "boolean")); parameters.put("formatHealth", new FeatureParameter("formatHealth", "format health", "1234568 -> 1m", true, "boolean")); + parameters.put("ignoreInattackable", new FeatureParameter("ignoreInattackable", "Don't show health of in-attackable enemy", "For example, do not show guardians health when they're not attackable", false, "boolean")); } SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @@ -40,7 +41,9 @@ public class FeatureBossHealth extends GuiFeature { FontRenderer fr = getFontRenderer(); boolean format = this.getParameter("formatHealth").getValue(); boolean total = this.getParameter("totalHealth").getValue(); + boolean ignore = this.getParameter("ignoreInattackable").getValue(); for (HealthData heal : healths) { + if (ignore && !heal.isAttackable()) continue; fr.drawString(heal.getName() + ": " + (format ? TextUtils.format(heal.getHealth()) : heal.getHealth()) + (total ? "/"+(format ? TextUtils.format(heal.getMaxHealth()) : heal.getMaxHealth()) : ""), 0, i, this.getParameter("color").getValue().getRGB()); i += 8; } -- cgit