Expand description
Hand-written protocol types shared by the generated packet code.
Re-exports§
pub use position::BlockPos;pub use position::PositionLayout;
Modules§
- position
- Block positions packed into 64 bits.
- slot
- Inventory slots (item stacks) in their per-version wire formats.
Structs§
- Byte
String - An immutable UTF-8 encoded string using
Bytesas the storage. - Uuid
- A Universally Unique Identifier (UUID).
Functions§
- angle_
to_ degrees - Converts a protocol angle byte (1/256 of a full turn) to degrees in
[-180, 180). - degrees_
to_ angle - Converts degrees to a protocol angle byte the way vanilla does
(
(int)(deg * 256 / 360), truncated, then wrapped to a byte). - f64_
to_ fixed - Converts blocks to a 1.8-style fixed-point coordinate (
floor(v * 32), like vanilla). - fixed_
to_ f64 - Converts a 1.8-style fixed-point coordinate (1/32 block, as in spawn/teleport packets) to blocks.