Skip to main content

Module basic

Module basic 

Source
Expand description

Basic Minecraft protocol types and their wire encodings.

This module includes primitive numeric values, booleans, variable-length integers, length-prefixed strings, and resource identifiers.

Structs§

Boolean
A boolean encoded as 0x00 for false or 0x01 for true.
Byte
A two’s-complement signed 8-bit integer from -128 through 127.
Identifier
A resource identifier encoded as a PrefixedString.
Int
A two’s-complement signed 32-bit integer from -2,147,483,648 through 2,147,483,647.
InvalidIdentifier
An error returned when a string is not a valid Minecraft resource identifier.
Long
A two’s-complement signed 64-bit integer from -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807.
PrefixedString
A UTF-8 string prefixed by its byte length as a VarInt.
Short
A two’s-complement signed 16-bit integer from -32,768 through 32,767.
UnsignedByte
An unsigned 8-bit integer from 0 through 255.
UnsignedShort
An unsigned 16-bit integer from 0 through 65,535.
VarInt
A variable-length two’s-complement signed 32-bit integer.
VarLong
A variable-length two’s-complement signed 64-bit integer.