Structure

NBT Data can be accessed with data command, we well as data argument of execute command.

We are going to use NBT Paths a lot, so it is important to understand them. It is simpler to imagine NBT as a tree, that has leaves (elements) and root (entity/block/storage).

Graph 1: NBT Data of a real Item Frame, that has a bucket inside

In this example we have Pos, which is an array with coordinates XYZ and Item that corresponds to the item inside Item Frame. It has values id (string), Count (bytes) and tag (object | optional)


There are a couple of types you must understand:

Alternatives

Due to the latencies and lags NBT Data causes, it is always better to use other commands instead when possible, such as: item, tp, execute, scoreboard and so on.