From b808e27a2cc2c6c8fdf93e5de6ddf05053c3addb Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 12 Feb 2021 15:14:12 +0900 Subject: works pretty great --- .../features/impl/boss/FeatureCurrentPhase.java | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java new file mode 100644 index 00000000..f38e02ed --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java @@ -0,0 +1,55 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss; + +import kr.syeyoung.dungeonsguide.SkyblockStatus; +import kr.syeyoung.dungeonsguide.e; +import kr.syeyoung.dungeonsguide.features.text.StyledText; +import kr.syeyoung.dungeonsguide.features.text.TextHUDFeature; +import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessor; +import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorThorn; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class FeatureCurrentPhase extends TextHUDFeature { + public FeatureCurrentPhase() { + super("Bossfight", "Display Current Phase", "Displays the current phase of bossfight", "bossfight.phasedisplay", false, getFontRenderer().getStringWidth("Current Phase: fight-2-idk-howlng"), getFontRenderer().FONT_HEIGHT); + this.setEnabled(true); + } + + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + + private static final List dummyText= new ArrayList(); + static { + dummyText.add(new StyledText("Current Phase","title")); + dummyText.add(new StyledText(": ","separator")); + dummyText.add(new StyledText("fight-2","phase")); + } + @Override + public boolean isHUDViewable() { + return skyblockStatus.isOnDungeon() && skyblockStatus.getContext() != null && skyblockStatus.getContext().getBossfightProcessor() != null; + } + + @Override + public List getUsedTextStyle() { + return Arrays.asList(new String[] { + "title", "separator", "phase" + }); + } + + @Override + public List getDummyText() { + return dummyText; + } + + @Override + public List getText() { + String currentPhsae =skyblockStatus.getContext().getBossfightProcessor().getCurrentPhase(); + List actualBit = new ArrayList(); + actualBit.add(new StyledText("Current Phase","title")); + actualBit.add(new StyledText(": ","separator")); + actualBit.add(new StyledText(currentPhsae,"phase")); + return actualBit; + } + +} -- cgit