aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/lorenz/mod/events
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-08 08:09:43 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-08 08:09:43 +0200
commit05af452b76c10476e6806aed086a45374df7056f (patch)
tree2182554912c2321134d1075f37b1e3e54b28758c /src/main/java/at/lorenz/mod/events
parent94905a581216cbe22e7cd0ed6a8c97ed380feb94 (diff)
downloadskyhanni-05af452b76c10476e6806aed086a45374df7056f.tar.gz
skyhanni-05af452b76c10476e6806aed086a45374df7056f.tar.bz2
skyhanni-05af452b76c10476e6806aed086a45374df7056f.zip
added DungeonHighlightClickedBlocks, changed chat manager from forge event to packet
Diffstat (limited to 'src/main/java/at/lorenz/mod/events')
-rw-r--r--src/main/java/at/lorenz/mod/events/PacketEvent.kt25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/at/lorenz/mod/events/PacketEvent.kt b/src/main/java/at/lorenz/mod/events/PacketEvent.kt
new file mode 100644
index 000000000..3b8a26038
--- /dev/null
+++ b/src/main/java/at/lorenz/mod/events/PacketEvent.kt
@@ -0,0 +1,25 @@
+package at.lorenz.mod.events
+
+import net.minecraft.network.Packet
+import net.minecraftforge.fml.common.eventhandler.Cancelable
+
+@Cancelable
+open class PacketEvent(val packet: Packet<*>) : LorenzEvent() {
+ var direction: Direction? = null
+
+ class ReceiveEvent(packet: Packet<*>) : PacketEvent(packet) {
+ init {
+ direction = Direction.INBOUND
+ }
+ }
+
+ class SendEvent(packet: Packet<*>) : PacketEvent(packet) {
+ init {
+ direction = Direction.OUTBOUND
+ }
+ }
+
+ enum class Direction {
+ INBOUND, OUTBOUND
+ }
+} \ No newline at end of file