aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/events')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonCryptBrokenEvent.java19
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonDeathEvent.java20
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEvent.java21
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEventData.java5
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonMapUpdateEvent.java15
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonNodataEvent.java10
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonPuzzleFailureEvent.java15
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonRoomDiscoverEvent.java26
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonSecretCountChangeEvent.java21
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonStateChangeEvent.java23
10 files changed, 175 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonCryptBrokenEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonCryptBrokenEvent.java
new file mode 100644
index 00000000..53f833df
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonCryptBrokenEvent.java
@@ -0,0 +1,19 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.awt.*;
+
+@Data
+@AllArgsConstructor
+public class DungeonCryptBrokenEvent implements DungeonEventData {
+ private int prevCrypts;
+ private int newCrypts;
+
+ @Override
+ public String getEventName() {
+ return "CRYPTS_CHANGE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonDeathEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonDeathEvent.java
new file mode 100644
index 00000000..dfbfa0d3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonDeathEvent.java
@@ -0,0 +1,20 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.awt.*;
+
+@Data
+@AllArgsConstructor
+public class DungeonDeathEvent implements DungeonEventData {
+ private String playerName;
+ private String message;
+ private int cnt;
+
+ @Override
+ public String getEventName() {
+ return "PLAYER_DEATH";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEvent.java
new file mode 100644
index 00000000..cb2b3f57
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEvent.java
@@ -0,0 +1,21 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.features.FeatureRegistry;
+import lombok.Data;
+
+@Data
+public class DungeonEvent {
+ private long UTCTime = System.currentTimeMillis();
+ private long realTimeElapsed;
+ private long skyblockTimeElapsed;
+
+ private String eventName;
+ private DungeonEventData data;
+
+ public DungeonEvent(DungeonEventData eventData){
+ this.data = eventData;
+ this.realTimeElapsed = FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed();
+ this.skyblockTimeElapsed = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed();
+ this.eventName = eventData.getEventName();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEventData.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEventData.java
new file mode 100644
index 00000000..2aa5ff68
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonEventData.java
@@ -0,0 +1,5 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+public interface DungeonEventData {
+ String getEventName();
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonMapUpdateEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonMapUpdateEvent.java
new file mode 100644
index 00000000..39e6382b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonMapUpdateEvent.java
@@ -0,0 +1,15 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonMapUpdateEvent implements DungeonEventData {
+ private byte[] map;
+
+ @Override
+ public String getEventName() {
+ return "MAP_UPDATE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonNodataEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonNodataEvent.java
new file mode 100644
index 00000000..9820627d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonNodataEvent.java
@@ -0,0 +1,10 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonNodataEvent implements DungeonEventData {
+ private String eventName;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonPuzzleFailureEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonPuzzleFailureEvent.java
new file mode 100644
index 00000000..49ef1cfa
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonPuzzleFailureEvent.java
@@ -0,0 +1,15 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonPuzzleFailureEvent implements DungeonEventData {
+ private String playerName;
+ private String message;
+ @Override
+ public String getEventName() {
+ return "PUZZLE_FAILURE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonRoomDiscoverEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonRoomDiscoverEvent.java
new file mode 100644
index 00000000..44f3713f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonRoomDiscoverEvent.java
@@ -0,0 +1,26 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import net.minecraft.util.BlockPos;
+
+import java.awt.*;
+import java.util.UUID;
+
+@Data
+@AllArgsConstructor
+public class DungeonRoomDiscoverEvent implements DungeonEventData {
+ private Point unitPt;
+ private int rotation;
+ private BlockPos min;
+ private int shape;
+ private int color;
+ private UUID roomUID;
+ private String roomName;
+ private String roomProc;
+
+ @Override
+ public String getEventName() {
+ return "ROOM_DISCOVER";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonSecretCountChangeEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonSecretCountChangeEvent.java
new file mode 100644
index 00000000..e25b8dc0
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonSecretCountChangeEvent.java
@@ -0,0 +1,21 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.awt.*;
+
+@Data
+@AllArgsConstructor
+public class DungeonSecretCountChangeEvent implements DungeonEventData {
+ private int prevCount;
+ private int newCount;
+ private int totalSecret;
+ private boolean sureTotalSecret;
+
+ @Override
+ public String getEventName() {
+ return "SECRET_CNT_CHANGE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonStateChangeEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonStateChangeEvent.java
new file mode 100644
index 00000000..cc895b49
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/events/DungeonStateChangeEvent.java
@@ -0,0 +1,23 @@
+package kr.syeyoung.dungeonsguide.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import net.minecraft.util.BlockPos;
+
+import java.awt.*;
+import java.util.UUID;
+
+@Data
+@AllArgsConstructor
+public class DungeonStateChangeEvent implements DungeonEventData {
+ private Point unitPt;
+ private String roomName;
+ private DungeonRoom.RoomState from;
+ private DungeonRoom.RoomState to;
+
+ @Override
+ public String getEventName() {
+ return "ROOM_STATE_CHANGE";
+ }
+}