# Functions
Block decodes the data of a block into a world.Block.
Bool reads a uint8 value from a map at key k and returns true if it equals 1.
Float32 reads a float32 value from a map at key k.
Float64 reads a float64 value from a map at key k.
Int16 reads an int16 value from a map at key k.
Int32 reads an int32 value from a map at key k.
Int32FromRGBA converts a color.RGBA into an int32.
Int64 reads an int16 value from a map at key k.
InvFromNBT decodes the data of an NBT slice into the inventory passed.
InvToNBT encodes an inventory to a data slice which may be encoded as NBT.
Item decodes the data of an item into an item stack.
MapItem converts an item's name, count, damage (and properties when it is a block) in a map obtained by decoding NBT to a world.Item.
Pos converts x, y and z values in an NBT map to a cube.Pos.
PosToInt32Slice converts a cube.Pos to a []int32 with 3 elements.
RGBAFromInt32 converts an int32 into a color.RGBA.
Rotation reads a cube.Rotation from the map passed.
Slice reads a []any value from a map at key k.
String reads a string value from a map at key k.
TickDuration reads a uint8/int16/in32 value from a map at key k and converts it from ticks to a time.Duration.
Uint8 reads a uint8 value from a map at key k.
Vec3 converts x, y and z values in an NBT map to an mgl64.Vec3.
Vec3ToFloat32Slice converts an mgl64.Vec3 to a []float32 with 3 elements.
WriteBlock encodes a world.Block into a map that can be encoded using NBT.
WriteItem encodes an item stack into a map that can be encoded using NBT.