Initial Commit

This commit is contained in:
2025-03-06 21:45:08 +01:00
commit 9ddc02ad79
25 changed files with 513 additions and 0 deletions

View File

@ -0,0 +1,2 @@
package de.chaoscaot.replay

View File

@ -0,0 +1,4 @@
package de.chaoscaot.replay.commands
object ExtractSchematics {
}

View File

@ -0,0 +1,4 @@
package de.chaoscaot.replay.commands
object Info {
}

View File

@ -0,0 +1,4 @@
package de.chaoscaot.replay.commands
class ListPackets {
}

View File

@ -0,0 +1,4 @@
package de.chaoscaot.replay.parser
class EmbeddedSchematic {
}

View File

@ -0,0 +1,3 @@
package de.chaoscaot.replay.parser
data class Message()

View File

@ -0,0 +1,18 @@
package de.chaoscaot.replay.parser.packets
import java.io.DataInputStream
abstract class Packet(val type: PacketType)
interface PacketReader<T> {
fun readPacket(stream: DataInputStream): T
companion object {
fun readPacket(type: Byte, stream: DataInputStream): Packet =
PacketType.entries.find { it.id == type }?.reader?.readPacket(stream) ?: throw IllegalArgumentException("Unknown Packet")
}
}
enum class PacketType(val id: Byte, val reader: PacketReader<out Packet>) {
PLAYER_JOIN_PACKET(0x00, UserJoinPacketReader),
}

View File

@ -0,0 +1,2 @@
package de.chaoscaot.replay.parser

View File

@ -0,0 +1,4 @@
package de.chaoscaot.replay.parser
object ReplayParser {
}