{
  "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.timer_flag",
  "title": "Timer Flag",
  "description": "Fires an event when this behavior starts, then waits for a duration before stopping. When stopping due to that timeout or due to being interrupted by another behavior, fires another event. query.timer_flag_<n> will return 1.0 on both the client and server when this behavior is running, and 0.0 otherwise.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "priority": { "$ref": "types/priority.json" },
    "cooldown_range": {
      "title": "Cooldown Range",
      "anyOf": [
        {
          "type": "number", 
          "minimum": 0
        },
        {
          "$ref": "../../../../general/vectors/number2.json",
          "default": [10.0, 10.0]
        }
      ],
      "description": "Goal cooldown range in seconds."
    },
    "duration_range": {
      "title": "Duration Range",
      "anyOf": [
        {
          "type": "number", 
          "minimum": 0
        },
        {
          "$ref": "../../../../general/vectors/number2.json",
          "default": [2.0, 2.0]
        }
      ],
      "description": "Goal duration range in seconds."
    },
    "control_flags": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 1,
      "maxItems": 2,
      "items": {
        "enum": ["move", "look"]
      },
      "title": "Control Flags",
      "description": "UNDOCUMENTED"
    },
    "on_end": {
      "title": "On End",
      "$ref": "../types/trigger.json",
      "description": "Event to run when the goal ends."
    },
    "on_start": {
      "title": "On Start",
      "$ref": "../types/trigger.json",
      "description": "Event to run when the goal starts."
    }
  }
}
