{
  "fields": [
    {
      "id": "carried_item_switch_time",
      "title": "Carried Item Switch Time",
      "description": "The max time in seconds that the trader will hold an item before attempting to switch for a different item that takes the same trade",
      "defaultValue": 2,
      "dataType": 3,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 2
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 2
          }
        ]
      }
    },
    {
      "id": "cooldown",
      "title": "Cooldown",
      "description": "The time in seconds before the trader can use this goal again",
      "defaultValue": 2,
      "dataType": 3,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 2
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 2
          }
        ]
      }
    },
    {
      "id": "interest_time",
      "title": "Interest Time",
      "description": "The max time in seconds that the trader will be interested with showing its trade items",
      "defaultValue": 45,
      "dataType": 3,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 45
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 45
          }
        ]
      }
    },
    {
      "id": "remove_item_time",
      "title": "Remove Item Time",
      "description": "The max time in seconds that the trader will wait when you no longer have items to trade",
      "defaultValue": 1,
      "dataType": 3,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 1
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 1
          }
        ]
      }
    },
    {
      "id": "within_radius",
      "title": "Within Radius",
      "description": "Distance in blocks this mob can be interested by a player holding an item they like",
      "defaultValue": 0,
      "dataType": 3,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 6
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 6
          }
        ]
      }
    },
    {
      "id": "priority",
      "title": "Priority",
      "hideSamples": true,
      "description": "As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.",
      "dataType": 0,
      "samples": {
        "/vanilla/behavior_pack/entities/villager_v2.json": [
          {
            "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
            "content": 5
          },
          {
            "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
            "content": 5
          }
        ],
        "/vanilla/behavior_pack/entities/wandering_trader.json": [
          {
            "path": "/minecraft:entity/components/minecraft:behavior.trade_interest/",
            "content": 3
          }
        ]
      }
    }
  ],
  "description": "Allows the mob to look at a player that is holding a tradable item.",
  "title": "Trade Interest Behavior",
  "samples": {
    "/vanilla/behavior_pack/entities/villager_v2.json": [
      {
        "path": "/minecraft:entity/component_groups/trade_components/minecraft:behavior.trade_interest/",
        "content": {}
      },
      {
        "path": "/minecraft:entity/component_groups/farmer/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/fisherman/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/shepherd/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/fletcher/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/librarian/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/cartographer/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/cleric/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/armorer/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/weaponsmith/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/toolsmith/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/butcher/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/leatherworker/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      },
      {
        "path": "/minecraft:entity/component_groups/mason/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 5,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      }
    ],
    "/vanilla/behavior_pack/entities/wandering_trader.json": [
      {
        "path": "/minecraft:entity/components/minecraft:behavior.trade_interest/",
        "content": {
          "priority": 3,
          "within_radius": 6,
          "interest_time": 45,
          "remove_item_time": 1,
          "carried_item_switch_time": 2,
          "cooldown": 2
        }
      }
    ]
  },
  "id": "minecraft:behavior.trade_interest"
}