Skip to main content

Module nbt

Module nbt 

Source
Expand description

Vanilla-compatible NBT helpers. Vanilla-compatible NBT helpers.

Modules§

codec 🔒
Numeric coercions used by vanilla’s NBT-backed codecs.
path 🔒
snbt 🔒

Structs§

NbtPath
Parsed vanilla NBT path.
NbtPathError
Error returned when parsing an NBT path.
SnbtError
Error returned when parsing SNBT text.

Enums§

NbtPathErrorKind
Specific reason why NBT path parsing failed.
NbtPathMutationError
Error returned when mutating NBT through a path.
SnbtErrorKind
Specific reason why SNBT parsing failed.
SnbtNumberType
NBT integer type requested by an SNBT number suffix or array.

Traits§

NbtNumeric
Decodes numeric NBT tags with the conversions performed by vanilla’s DynamicOps number codecs.

Functions§

compare_lists_partially 🔒
compare_nbt
Mirrors vanilla NbtUtils.compareNbt.
compare_nbt_compounds
Compares two compounds with vanilla’s partial compound semantics.
double_tags_equal 🔒
float_tags_equal 🔒
merge_nbt_compounds
Recursively applies Vanilla CompoundTag.merge semantics.
nbt_collection_values
Returns values exposed by Vanilla’s NbtOps collection interface.
nbt_compounds_equal
Compares compounds as Vanilla maps, independent of serialized entry order.
nbt_list_values
Returns the semantic values of a Vanilla list.
nbt_tags_equal
Compares NBT values with Vanilla’s Tag.equals semantics.
normalize_nbt_compound
Converts an NBT compound to Vanilla’s map representation.
normalize_nbt_list 🔒
normalize_nbt_tag
Converts an NBT value and all descendants to Vanilla’s canonical in-memory representation.
parse_nbt_path
Parses one complete NBT path.
parse_nbt_path_argument
Parses one NBT path and returns the byte cursor consumed by it.
parse_snbt
Parses one complete SNBT tag.
parse_snbt_argument
Parses one SNBT tag and returns the byte cursor consumed by that tag.
parse_snbt_compound
Parses one complete SNBT compound.
parse_snbt_compound_argument
Parses one SNBT compound and returns the byte cursor consumed by it.
sized_array 🔒
sized_string 🔒
to_canonical_snbt
Renders an NBT value with Vanilla Tag::toString semantics.
unwrap_list_wrapper 🔒
vanilla_nbt_compound_heap_size 🔒
vanilla_nbt_heap_size
Returns the heap usage charged by Vanilla’s NbtAccounter while decoding.
vanilla_nbt_list_heap_size 🔒