diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-12 22:15:07 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-12 22:15:07 +0200 |
commit | b8a45b9a0438a12ba3c609f6e416d519829471be (patch) | |
tree | aff190bb953d94f1187896b2c245644a29e6badf /src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt | |
parent | 3c7e6b6177de6ef3cff8a46bb1726466a299cdde (diff) | |
download | firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.tar.gz firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.tar.bz2 firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.zip |
Improve location and profile detection
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt b/src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt deleted file mode 100644 index 10af7d0..0000000 --- a/src/main/kotlin/moe/nea/firmament/apis/ingame/FirmamentCustomPayload.kt +++ /dev/null @@ -1,31 +0,0 @@ - -package moe.nea.firmament.apis.ingame - -import io.netty.buffer.ByteBuf -import net.minecraft.network.codec.PacketCodec -import net.minecraft.network.packet.CustomPayload -import net.minecraft.util.Identifier - -interface FirmamentCustomPayload : CustomPayload { - - class Unhandled private constructor(val identifier: Identifier) : FirmamentCustomPayload { - override fun getId(): CustomPayload.Id<out CustomPayload> { - return CustomPayload.id(identifier.toString()) - } - - companion object { - fun <B : ByteBuf> createCodec(identifier: Identifier): PacketCodec<B, Unhandled> { - return object : PacketCodec<B, Unhandled> { - override fun decode(buf: B): Unhandled { - return Unhandled(identifier) - } - - override fun encode(buf: B, value: Unhandled) { - // we will never send an unhandled packet stealthy - } - } - } - } - - } -} |