Reads or modifies NBT data on blocks, entities, or storage.
/data get entity <target> [path] /data merge block <x> <y> <z> <nbt>
| Name | Required | Description |
|---|---|---|
| target | Yes | Entity or block to inspect. |
| path | No | NBT path selector. |
| nbt | No | New NBT data to merge. |
/data get entity @p SelectedItem
/data merge block ~ ~ ~ {CustomName:"\"Cool Chest\""}
Java-only in current editions.