ByteArray

Array of unsigned bytes (clients and other softwares may interpret the bytes as signed due to limitations of the programming language). The tag is usually used by Minecraft's worlds to store blocks' ids and metas.

If a signed byte is needed a cast operation can be done.

alias ByteArray = NumericArrayTag!(byte, NBT_TYPE.BYTE_ARRAY)

Examples

auto unsigned = new ByteArray([0, 1, 255]);
auto signed = cast(byte[])unsigned;
assert(signed == [0, 1, -1]);

Meta