Commands/data

Allows the player to get, merge, and remove entity and block NBT data.


 * Syntax




 * Arguments


 * pos
 * Specifies the position of the block.


 * target
 * Specifies the target entity.


 * path (Optional)
 * Specifies the path to the targeted NBT.
 * Data paths look like this:.
 * means foo's child called bar.
 * means element 0 of foo.
 * "quoted strings" may be used if a name of a key needs to be escaped.


 * scale (Optional)
 * Scales the number retrieved from.


 * nbt
 * Specifies the NBT tag to be merged/removed.


 * Result


 * Fails if the arguments are not specified correctly.


 * On success:
 * — Returns the NBT data from the block at pos or one target entity as its result (if a path is specified). A path can be specified to only retrieve that NBT data, but this is limited to numeric tags. An optional scale can be provided to scale the number retrieved.
 * — Merges the block NBT data at pos or from the target entity with the specified nbt data.
 * — Will remove NBT data at path from the block at pos or from one target entity. Removing player NBT data is not allowed.