From 05af452b76c10476e6806aed086a45374df7056f Mon Sep 17 00:00:00 2001 From: Lorenz Date: Fri, 8 Jul 2022 08:09:43 +0200 Subject: added DungeonHighlightClickedBlocks, changed chat manager from forge event to packet --- src/main/java/at/lorenz/mod/events/PacketEvent.kt | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/at/lorenz/mod/events/PacketEvent.kt (limited to 'src/main/java/at/lorenz/mod/events') 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 -- cgit