[][src]Module ozelot::write

Functions for serializing datatypes used by the protocol

Functions

write_String

Write a String to the Writer, ensuring to properly length-prefix it

write_bool

Write a boolean to the Writer

write_bytearray

Write a bytearray without any length prefix

write_bytearray_to_end

Alias for write_bytearray

write_f32

Write a single f32 to the Writer

write_f64

Write a single f64 to the Writer

write_i8

Write a single i8 to the Writer

write_i16

Write a single i16 to the Writer

write_i32

Write a single signed 32-bit int to the Writer

write_i64

Write a single i64 to the Writer

write_position

Write a position as described on wiki.vg, i.e. x/y/z encoded as an u64

write_prefixed_bytearray

Write a length-prefixed bytearray, where the length is given as a varint

write_prefixed_varintarray

Write a length-prefixed varint array, where the length is a varint

write_u8

Write a single unsigned byte to the Writer

write_u16

Write a single u16 to the Writer

write_u32

Write a single unsigned 32-bit int to the Writer

write_u64

Write a single unsigned 64-bit int to the Writer

write_u128

Write a single unsigned 128-bit int to the Writer

write_uuid_str

Write a uuid (u128) in hexadecimal string format, without dashes

write_uuid_str_dashes

Write a uuid (u128) in hexadecimal string format with dashes

write_varint

Write a single i32 to the Writer, as a varint

write_varlong

Write a single i64 to the Writer, as a Minecraft-style varlong