{
  "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.avoid_mob_type",
  "additionalProperties": false,
  "type": "object",
  "title": "Avoid Mob Type",
  "description": "Allows the entity to run away from other entities that meet the criteria specified.",
  "required": [],
  "properties": {
    "priority": {
      "$ref": "./types/priority.json"
    },
    "avoid_mob_sound": {
      "title": "Avoid Mob Sound",
      "default": "",
      "description": "The sound event to play when the mob is avoiding another mob.",
      "$ref": "../../../../general/sound_event.json"
    },
    "avoid_target_xz": {
      "title": "Avoid Target XZ",
      "type": "integer",
      "default": 16,
      "description": "The next target position the entity chooses to avoid another entity will be chosen within this XZ Distance."
    },
    "avoid_target_y": {
      "title": "Avoid Target Y",
      "type": "integer",
      "default": 7,
      "description": "The next target position the entity chooses to avoid another entity will be chosen within this Y Distance."
    },
    "ignore_visibilty": {
      "title": "Ignore Visibilty",
      "type": "boolean",
      "default": false,
      "description": "Whether or not to ignore direct line of sight while this entity is running away from other specified entities."
    },
    "max_dist": {
      "title": "Max Dist",
      "type": "number",
      "default": 3.0,
      "description": "Maximum distance to look for an avoid target for the entity."
    },
    "max_flee": {
      "title": "Max Flee",
      "type": "number",
      "default": 10.0,
      "description": "How many blocks away from its avoid target the entity must be for it to stop fleeing from the avoid target."
    },
    "probability_per_strength": {
      "title": "Probability Per Strength",
      "type": "number",
      "default": 1.0,
      "description": "Percent chance this entity will stop avoiding another entity based on that entity's strength, where 1.0 = 100%."
    },
    "remove_target": {
      "title": "Remove Target",
      "type": "boolean",
      "default": false,
      "description": "Determine if we should remove target when fleeing or not."
    },
    "sprint_distance": {
      "title": "Sprint Distance",
      "type": "number",
      "default": 7.0,
      "description": "How many blocks within range of its avoid target the entity must be for it to begin sprinting away from the avoid target."
    },
    "sprint_speed_multiplier": {
      "title": "Sprint Speed Multiplier",
      "type": "number",
      "default": 1.0,
      "description": "Multiplier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster."
    },
    "walk_speed_multiplier": {
      "title": "Walk Speed Multiplier",
      "type": "number",
      "default": 1.0,
      "description": "Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster."
    },
    "ignore_visibility": {
      "type": "boolean",
      "default": false,
      "description": "If true, visbility between this entity and the mob type will not be checked.",
      "title": "Ignore Visibility"
    },
    "entity_types": {
      "$ref": "../types/entity_types.json",
      "title": "Entity Types",
      "description": "The list of conditions another entity must meet to be a valid target to avoid."
    },
    "on_escape_event": {
      "$ref": "../types/event.json",
      "title": "On Escape Event",
      "description": "Event that is triggered when escaping from a mob."
    },
    "sound_interval": {
      "title": "Sound Interval",
      "default": [3.0, 8.0],
      "description": "The range of time in seconds to randomly wait before playing the sound again.",
      "oneOf": [
        {
          "type": "array",
          "items": [
            {
              "type": "number",
              "title": "Maximum"
            },
            {
              "type": "number",
              "title": "Maximum"
            }
          ]
        },
        {
          "type": "number"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "range_min": {
              "type": "number"
            },
            "range_max": {
              "type": "number"
            }
          }
        }
      ]
    }
  },
  "examples": [
    {
      "max_dist": 0,
      "max_flee": 0.5,
      "walk_speed_multiplier": 1.0,
      "sprint_speed_multiplier": 1.0,
      "probability_per_strength": 1.0,
      "ignore_visibility": false,
      "avoid_mob_sound": "example",
      "remove_target": true
    }
  ]
}
