diff options
author | syeyoung <cyong06@naver.com> | 2021-02-22 01:09:29 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-22 01:09:29 +0900 |
commit | 4f289db303d4e68e68789767b91e3106ff1866d7 (patch) | |
tree | 63eea29ec022ecaba104f5fb81f98636848d7a66 /src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | |
parent | 19e32413deb3dfc722ae66b861a76c43af6d0829 (diff) | |
download | Skyblock-Dungeons-Guide-4f289db303d4e68e68789767b91e3106ff1866d7.tar.gz Skyblock-Dungeons-Guide-4f289db303d4e68e68789767b91e3106ff1866d7.tar.bz2 Skyblock-Dungeons-Guide-4f289db303d4e68e68789767b91e3106ff1866d7.zip |
events
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index 2515698f..ad8de026 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -4,6 +4,9 @@ import com.google.common.collect.BiMap; import com.google.common.collect.EnumHashBiMap; import com.google.common.collect.HashBiMap; import com.google.common.collect.Sets; +import kr.syeyoung.dungeonsguide.dungeon.events.DungeonMapUpdateEvent; +import kr.syeyoung.dungeonsguide.dungeon.events.DungeonNodataEvent; +import kr.syeyoung.dungeonsguide.dungeon.events.DungeonRoomDiscoverEvent; import kr.syeyoung.dungeonsguide.e; import kr.syeyoung.dungeonsguide.SkyblockStatus; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; @@ -157,6 +160,7 @@ public class MapProcessor { e.sendDebugChat(new ChatComponentText("Dimension:"+unitRoomDimension)); e.sendDebugChat(new ChatComponentText("top Left:"+topLeftMapPoint)); e.sendDebugChat(new ChatComponentText("door dimension:"+doorDimension)); + context.createEvent(new DungeonNodataEvent("MAP_PROCESSOR_INIT")); initialized = true; MinecraftForge.EVENT_BUS.post(new DungeonContextInitializationEvent()); } @@ -225,6 +229,7 @@ public class MapProcessor { MapUtils.record(mapData, mapPoint.x, mapPoint.y, new Color(0,255,255,80)); DungeonRoom rooms = buildRoom(mapData, new Point(x,y)); if (rooms == null) continue; + context.createEvent(new DungeonRoomDiscoverEvent(rooms.getUnitPoints().get(0), rooms.getRoomMatcher().getRotation(), rooms.getMin(), rooms.getShape(),rooms.getColor(), rooms.getDungeonRoomInfo().getUuid(), rooms.getDungeonRoomInfo().getName(), rooms.getDungeonRoomInfo().getProcessorId())); e.sendDebugChat(new ChatComponentText("New Map discovered! shape: "+rooms.getShape()+ " color: "+rooms.getColor()+" unitPos: "+x+","+y)); e.sendDebugChat(new ChatComponentText("New Map discovered! mapMin: "+rooms.getMin() + " mapMx: "+rooms.getMax())); StringBuilder builder = new StringBuilder(); @@ -342,6 +347,7 @@ public class MapProcessor { if (isThereDifference(lastMapData, mapData)) { stabilizationTick =0; + context.createEvent(new DungeonMapUpdateEvent(mapData)); } else { stabilizationTick++; } |