Module codec_utils

Module codec_utils 

Source
Expand description

Some functions that are useful to have when implementing Serialize/Deserialize, which Azalea uses to imitate Minecraft codecs.

Structs§

IntArray
An internal type that makes the i32 array be serialized differently.
LongArray
An internal type that makes the i64 array be serialized differently.

Functions§

flatten_array
If the array has a single item, don’t serialize as an array
is_default
Intended to be used for skipping serialization if the value is the default.
is_true
Intended to be used for skipping serialization if the value is true.
uuid
Minecraft writes UUIDs as an IntArray<4>