io.github.kory33.s2mctest.core.connection.protocol

Type members

Classlikes

class PacketIdBindings[PacketTup <: Tuple](bindings: Map[PacketTup, CodecBinding])(using x$2: Require[ContainsDistinctT[PacketTup]])

An object that associates packet IDs with corresponding datatypes' codec.

An object that associates packet IDs with corresponding datatypes' codec.

PacketTup is a tuple of packets with no duplicates, used in associating codecs. It is also required that bindings should not contain two entries with the same packet ID.

Companion
object
Companion
class
class Protocol[ServerBoundPackets <: Tuple, ClientBoundPackets <: Tuple](val serverBound: PacketIdBindings[ServerBoundPackets], val clientBound: PacketIdBindings[ClientBoundPackets])

The protocol, between the "client" and "server" of Minecraft, that decides what packet ID is associated to what datatype. This object also describes the way to serialize and deserialize each associated datatype. For more details, see PacketIdBindings.

The protocol, between the "client" and "server" of Minecraft, that decides what packet ID is associated to what datatype. This object also describes the way to serialize and deserialize each associated datatype. For more details, see PacketIdBindings.

Types

type PacketId = Int