diff options
author | syeyoung <cyong06@naver.com> | 2021-01-22 12:59:23 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-22 12:59:23 +0900 |
commit | 1ce6ac3c20768422b05f9e861ed0a41bd2f0c8d2 (patch) | |
tree | 39b3b4abb8fda7515e55978d73d196fc880ff24e /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor | |
parent | 35202074c907920f7d3cb41575db7db1e1e664f3 (diff) | |
download | Skyblock-Dungeons-Guide-1ce6ac3c20768422b05f9e861ed0a41bd2f0c8d2.tar.gz Skyblock-Dungeons-Guide-1ce6ac3c20768422b05f9e861ed0a41bd2f0c8d2.tar.bz2 Skyblock-Dungeons-Guide-1ce6ac3c20768422b05f9e861ed0a41bd2f0c8d2.zip |
ahm
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
4 files changed, 59 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index c435b331..2700b1d9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -15,6 +15,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; +import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.event.entity.living.LivingEvent; import java.awt.*; import java.util.Map; @@ -105,6 +107,16 @@ public class GeneralRoomProcessor implements RoomProcessor { return false; } + @Override + public void onPostGuiRender(GuiScreenEvent.DrawScreenEvent.Post event) { + + } + + @Override + public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) { + + } + public static class Generator implements RoomProcessorGenerator<GeneralRoomProcessor> { @Override public GeneralRoomProcessor createNew(DungeonRoom dungeonRoom) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java index e922cfd1..aae86a48 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java @@ -2,6 +2,8 @@ package kr.syeyoung.dungeonsguide.roomprocessor; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import net.minecraft.util.IChatComponent; +import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.event.entity.living.LivingEvent; public interface RoomProcessor { void tick(); @@ -11,4 +13,7 @@ public interface RoomProcessor { void actionbarReceived(IChatComponent chat); boolean readGlobalChat(); + + void onPostGuiRender(GuiScreenEvent.DrawScreenEvent.Post event); + void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent); }
\ No newline at end of file diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java new file mode 100644 index 00000000..3cb85642 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java @@ -0,0 +1,30 @@ +package kr.syeyoung.dungeonsguide.roomprocessor.bossfight; + +import net.minecraft.client.entity.EntityOtherPlayerMP; +import net.minecraft.entity.item.EntityArmorStand; +import net.minecraftforge.event.entity.living.LivingEvent; + +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Set; + +public class BossfightProcessorLivid extends GeneralBossfightProcessor { + private String realLividName; + + private Set<String> knownLivids = new HashSet<String>(); + + public BossfightProcessorLivid() { + addPhase(PhaseData.builder().phase("start").build()); + } + + @Override + public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) { + if (updateEvent.entityLiving.getName().endsWith("Livid") && updateEvent.entityLiving instanceof EntityOtherPlayerMP) { + if (!knownLivids.contains(updateEvent.entityLiving.getName())) { + knownLivids.add(updateEvent.entityLiving.getName()); + realLividName = updateEvent.entityLiving.getName(); + System.out.println("Think real livid is "+realLividName); + } + } + } +} 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 45c38697..5b71d406 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java @@ -4,6 +4,8 @@ import lombok.Builder; import lombok.Data; import lombok.Singular; import net.minecraft.util.IChatComponent; +import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.event.entity.living.LivingEvent; import java.util.*; @@ -67,6 +69,16 @@ public class GeneralBossfightProcessor implements BossfightProcessor { @Override public boolean readGlobalChat() {return true;} + @Override + public void onPostGuiRender(GuiScreenEvent.DrawScreenEvent.Post event) { + + } + + @Override + public void onEntitySpawn(LivingEvent.LivingUpdateEvent updateEvent) { + + } + public void onPhaseChange() {} @Data |