Named Binary Tag
Information between two points are passed in many different ways in Minecraft. The most common of them is known as NBTs. NBTs are a structured binary file used to store information on the disk. They are also used as intermediaries to hold information that will be sent across a network. Understanding and utilizing NBTs properly is a good start to understanding disk storage in general.
There are a total of fourteen different nbt data types that can be parsed. The most common one to use is
CompoundTags within a
Entity when it comes to writing to the disk. However, on capabilities, other types can be specified to reduce the space it takes on a file.
All types implement
Tag in some fashion. This interface holds basic methods for writing to a file and copying itself. It also holds basic methods to determine the output to a chat line.
||Specifies the end of an nbt file.|
||Holds a byte. Also used to store a boolean value.|
||Holds a short.|
||Holds an integer.|
||Holds a long.|
||Holds a float.|
||Holds a double.|
||Holds a byte array. Can be parsed from an array of primitive bytes or a list of byte objects.|
||Holds a string.|
||Holds a list of a specific |
||Holds an object comprised of |
||Holds an integer array. Can be parsed from an array of primitive integers or a list of integer objects.|
||Holds an long array. Can be parsed from an array of primitive long, a list of long objects, or a |
||Holds a generic number. Used when the specific |
In most cases, you will only have to deal with
ListTag. The others are usually handled internally by whichever type uses them.
CompoundTags are used similar to objects. You can
put and value within them using a key. You can then retrieve the value once again with that same key. It has specific methods for putting and getting most of the different types of data (e.g. an integer using
ListTags are functionally the same as
ArrayLists. You can
get a specific NBT type.