NBT
Documentation for NBT.
NBT.TagList
NBT.begin_compound
NBT.begin_compound
NBT.begin_list
NBT.begin_list
NBT.begin_nbt_file
NBT.end_compound
NBT.end_nbt_file
NBT.read
NBT.read
NBT.read_uncompressed
NBT.write
NBT.write
NBT.write_tag
NBT.write_tag
NBT.write_uncompressed
NBT.TagList
— Typestruct TagList{T}
Represents an NBT list tag, containing an array of T. See minecraft wiki.
Properties
data::Vector{T}
: The data in the tag.
NBT.begin_compound
— Methodbegin_compound(io, name)
Begin an NBT Compound tag and return the number of bytes written. Use only for the root tag (with an empty name) or between begin_compound
and end_compound
.
NBT.begin_compound
— Methodbegin_compound(io)
Begin an NBT Compound tag and return the number of bytes written. Use only after begin_list
.
Note: This method just returns 0
, but is included for completeness and to allow for more readable code.
NBT.begin_list
— Methodbegin_list(io, length, type)
Begin an NBT List tag with the specified length and element type and return the number of bytes written. Use only after begin_list
.
NBT.begin_list
— Methodbegin_list(io, name, length, type)
Begin an NBT List tag with the specified length and element type and return the number of bytes written. Use only between begin_compound
and end_compound
.
NBT.begin_nbt_file
— Methodbegin_nbt_file(io)
Begin an NBT file and return a stream and the number of bytes written.
NBT.end_compound
— Methodend_compound(io)
End the current NBT Compound tag and return the number of bytes written.
NBT.end_nbt_file
— Methodend_nbt_file(io)
End an NBT file and return the number of bytes written.
NBT.read
— Methodread(io)
Read NBT data from an IO and return the data as Julia objects.
NBT.read
— Methodread(filename)
Read an NBT file and return the data as Julia objects.
NBT.read_uncompressed
— Methodread_uncompressed(io, ::Type{Tag})
Reads an nbt tag from an uncompressed IO
. Not exported.
NBT.write
— Methodwrite(io)
Write NBT data to an IO and return the number of bytes written.
NBT.write
— Methodwrite(filename)
Write an NBT file and return the number of bytes written.
NBT.write_tag
— Methodwrite_tag(io, data)
Write the data
tag and return the number of bytes written. Use only after begin_list
.
NBT.write_tag
— Methodwrite_tag(io, name => data)
Write the name => data
pair and return the number of bytes written. Use only between begin_compound
and end_compound
.
NBT.write_uncompressed
— Methodwrite_uncompressed(io, tag)
Writes an nbt tag to an uncompressed IO
. Not exported.