diff options
author | syeyoung <cyong06@naver.com> | 2021-01-30 18:29:51 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-30 18:29:51 +0900 |
commit | 7fc7b45713e3a84cb3dd4455fa516359e49a2e43 (patch) | |
tree | c009ac7bfa2abcaaf7549fc0ea0e6d1de7d1f370 /src/main/java/kr/syeyoung/dungeonsguide/features/impl | |
parent | 35788e6f46a35499bd024cb3227d27ce9e6a76a3 (diff) | |
download | Skyblock-Dungeons-Guide-7fc7b45713e3a84cb3dd4455fa516359e49a2e43.tar.gz Skyblock-Dungeons-Guide-7fc7b45713e3a84cb3dd4455fa516359e49a2e43.tar.bz2 Skyblock-Dungeons-Guide-7fc7b45713e3a84cb3dd4455fa516359e49a2e43.zip |
Thorn upgrade
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java new file mode 100644 index 00000000..c1ca2882 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java @@ -0,0 +1,40 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss; + +import kr.syeyoung.dungeonsguide.SkyblockStatus; +import kr.syeyoung.dungeonsguide.dungeon.DungeonContext; +import kr.syeyoung.dungeonsguide.e; +import kr.syeyoung.dungeonsguide.features.FeatureParameter; +import kr.syeyoung.dungeonsguide.features.GuiFeature; +import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorThorn; +import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.HealthData; +import kr.syeyoung.dungeonsguide.utils.TextUtils; +import net.minecraft.client.gui.FontRenderer; + +import java.awt.*; +import java.util.List; + +public class FeatureThornBearPercentage extends GuiFeature { + public FeatureThornBearPercentage() { + super("Bossfight", "Display Spirit Bear Summon Percentage", "Displays spirit bear summon percentage in hud", "bossfight.spiritbear", true, getFontRenderer().getStringWidth("Spirit Bear: 50%"), getFontRenderer().FONT_HEIGHT); + this.setEnabled(true); + parameters.put("color", new FeatureParameter<Color>("color", "Color", "Color of text", Color.orange, "color")); + } + + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + @Override + public void drawHUD(float partialTicks) { + if (!skyblockStatus.isOnDungeon()) return; + DungeonContext context = skyblockStatus.getContext(); + if (context == null) return; + if (!(context.getBossfightProcessor() instanceof BossfightProcessorThorn)) return; + int percentage = (int) (((BossfightProcessorThorn) context.getBossfightProcessor()).calculatePercentage() * 100); + FontRenderer fr = getFontRenderer(); + fr.drawString("Spirit Bear: "+percentage+"%", 0,0, this.<Color>getParameter("color").getValue().getRGB()); + } + + @Override + public void drawDemo(float partialTicks) { + FontRenderer fr = getFontRenderer(); + fr.drawString("Spirit Bear: 50%", 0,0, this.<Color>getParameter("color").getValue().getRGB()); + } +} |