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§

Angle
A rotation angle encoded in steps of 1/256 of a full turn.
BitSet
A length-prefixed bit set.
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.
Double
A big-endian IEEE-754 double-precision floating-point number.
FixedBitSet
A bit set with a fixed length of N bits.
Float
A big-endian IEEE-754 single-precision floating-point number.
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.
LpVec3
Three doubles compressed into a shared-scale, low-precision vector.
Position
A Minecraft protocol block position packed into a 64-bit value.
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.
Uuid
A 128-bit universally unique identifier.
VarInt
A variable-length two’s-complement signed 32-bit integer.
VarLong
A variable-length two’s-complement signed 64-bit integer.