Minecraft v0.1.0 Minecraft.Packet View Source
Base serialization and deserialization routines for packets.
Link to this section Summary
Functions
Decodes a string
Decodes a variable-size integer
Decodes a variable-size long
Given a raw binary packet, deserializes it into a Packet struct
Encodes a string
Encodes a variable-size integer
Serializes a packet into binary data
Serializes a packet binary into the standard packet format
Link to this section Types
Link to this type
varlong()
View Source
varlong() :: -9_223_372_036_854_775_808..9_223_372_036_854_775_807
Link to this section Functions
Decodes a string.
Decodes a variable-size integer.
Decodes a variable-size long.
Given a raw binary packet, deserializes it into a Packet struct.
Encodes a string.
Encodes a variable-size integer.
Serializes a packet into binary data.
Serializes a packet binary into the standard packet format:
| Field | Type | Description |
|---|---|---|
| Length | VarInt | Length of packet data + length of the packet ID |
| Packet ID | VarInt | |
| Data | Binary | The serialized packet data |