Minecraft Wiki
Advertisement
  • data: Root command node.
    • get: Gets the value of an NBT. It will be printed in display and passed in the command result value.
      • A target data object
        • [<path>]: Optional. An NBT path for tag retrieval.
          • [<scale>]: Optional; requires [<path>]. The scale to multiply the retrieved number tag by, so that float-point numbers can be stored properly in a command result.
    • merge: Merges a hardcoded NBT into a data object.
    • modify: Modifies a target data object from an NBT source.
      • A target data object
        • <targetPath>: An NBT path for tag retrieval.
          • append: Inserts the source NBT into the end of the target NBT list or array. Same as insert -1.
          • insert: Adds the source NBT to a specific location in the target NBT if the target NBT is an array or a list.
            • <index>: The intended index of the inserted source NBT in the list or array after the operation. A negative number indicates its index from the end of the array, such as -1 indicates the source NBT will be the last element in the list or array after insertion.
          • merge: Merges the source NBT into the target NBT.
          • prepend: Inserts the source NBT into the beginning of the target NBT list or array. Same as insert 0.
          • set: Overrides the source NBT with the target NBT.
    • remove: Removes the NBT on an NBT path.

A target or source data object:

An NBT source

  • from: Indicates a block entity/entity source.
  • value: Indicates a hardcoded NBT source.
Advertisement