{
  "condition": "minecraft:all_of",
  "terms": [
    {
      "condition": "minecraft:entity_properties",
      "entity": "this",
      "predicate": {
        "slots": {
          "weapon.mainhand": {
            "items": "minecraft:shield"
          }
        }
      }
    },
    {
      "condition": "minecraft:inverted",
      "term": {
        "condition": "minecraft:entity_properties",
        "entity": "this",
        "predicate": {
          "slots": {
            "weapon.mainhand": {
              "items": "minecraft:shield",
              "components": {
                "minecraft:custom_data": "{replaced:1}"
              }
            }
          }
        }
      }
    }
  ]
}