mc_protocol v0.0.2 McProtocol.NBT

Module for reading and writing NBT (http://wiki.vg/NBT)

The optional argument on the read/write functions allows the root tag to be nil. This encodes as a NBT end tag.

Summary

Types

byte_array_tag :: {:byte_array, tag_name, binary}
compound_tag :: {:compound, tag_name, [tag]}
float_tag :: {:float | :double, tag_name, float}
int_array_tag :: {:int_array, tag_name, [integer]}
integer_tag :: {:byte | :short | :int | :long, tag_name, integer}
list_tag :: {:list, tag_name, [tag]}
string_tag :: {:string, tag_name, binary}
tag_name :: binary | nil

Functions

read(bin, optional \\ false)

Specs

read(binary, boolean) :: t
read_gzip(bin, optional \\ false)

Specs

read_gzip(binary, boolean) :: t
write(struct, optional \\ false)

Specs

write(t, boolean) :: t