From 7c45bc056f404eb743bd97bf2c3c5900cde27083 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sun, 17 Jan 2021 13:59:42 +0900 Subject: more things --- .../syeyoung/dungeonsguide/eventlistener/DungeonListener.java | 10 +++++++++- .../roomprocessor/bossfight/BossfightProcessor.java | 1 + .../roomprocessor/bossfight/GeneralBossfightProcessor.java | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java index 2bc878a1..6f4f2e10 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java @@ -34,6 +34,7 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; +import org.apache.commons.lang3.StringUtils; import org.lwjgl.opengl.GL11; import scala.collection.parallel.ParIterableLike; @@ -118,8 +119,15 @@ public class DungeonListener { DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt); FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj; if (dungeonRoom == null) { - if (FeatureRegistry.DEBUG.isEnabled()) + if (FeatureRegistry.DEBUG.isEnabled() && context.getBossfightProcessor() == null) { fontRenderer.drawString("Where are you?!", 5, 128, 0xFFFFFF); + } else if (FeatureRegistry.DEBUG.isEnabled() && context.getBossfightProcessor() != null){ + fontRenderer.drawString("You're prob in bossfight", 5, 128, 0xFFFFFF); + fontRenderer.drawString("processor: "+context.getBossfightProcessor(), 5, 138, 0xFFFFFF); + fontRenderer.drawString("phase: "+context.getBossfightProcessor().getCurrentPhase(), 5, 148, 0xFFFFFF); + fontRenderer.drawString("nextPhase: "+ StringUtils.join(context.getBossfightProcessor().getNextPhases(), ","), 5, 158, 0xFFFFFF); + fontRenderer.drawString("phases: "+ StringUtils.join(context.getBossfightProcessor().getPhases(), ","), 5, 168, 0xFFFFFF); + } } else { if (FeatureRegistry.DEBUG.isEnabled()) { fontRenderer.drawString("you're in the room... color/shape " + dungeonRoom.getColor() + " / " + dungeonRoom.getShape(), 5, 128, 0xFFFFFF); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java index c893258e..395c3542 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java @@ -7,4 +7,5 @@ import java.util.List; public interface BossfightProcessor extends RoomProcessor { List getPhases(); String getCurrentPhase(); + List getNextPhases(); } \ No newline at end of file diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java index 4fa60623..6c593548 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java @@ -24,6 +24,13 @@ public class GeneralBossfightProcessor implements BossfightProcessor { return phases; } + @Override + public List getNextPhases() { + if (currentPhase == null) return Collections.emptyList(); + List phases = new ArrayList(this.currentPhase.getNextPhases()); + return phases; + } + @Override public String getCurrentPhase() { return currentPhase == null ? "unknown" : currentPhase.getPhase(); -- cgit