Merge Adapter | NBT - WolfyScript/CustomCrafting GitHub Wiki

Key: customcrafting:nbt/merge

Merges the same NBT Tags from all selected items into the result.

The NBTQuery constructs a NBTCompound with the data requested by the query. That NBTCompound is then merged with the NBT of the result.

Properties:
query: The NBTQuery to find the NBT Tags to merge.

{
  key : "customcrafting:nbt/merge",
  query {
    // NBTQuery
  }
}

Examples:

Copies all the NBT

{
  key: "customcrafting:nbt/merge"
  query {
    includeAll: true
  }
}

Copies Leather armor color, Custom model data, and all attribute modifiers

{
  key: "customcrafting:nbt/merge"
  query {
    display { 
      color: true // Selects the Leather Armor Color
    }
    CustomModelData: true // Selects the CustomModelData
    AttributeModifiers: true // Selects all Attribute Modifiers
  }
}