{
  "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.go_home",
  "additionalProperties": false,
  "description": "Allows the mob to move back to the position they were spawned.",
  "title": "Go Home",
  "type": "object",
  "properties": {
    "priority": { "$ref": "types/priority.json" },
    "speed_multiplier": { "$ref": "types/speed_multiplier.json" },
    "goal_radius": {
      "type": "number",
      "default": 0.5,
      "description": "Distance in blocks within the mob considers it has reached the goal. This is the `wiggle room` to stop the AI from bouncing back and forth trying to reach a specific spot",
      "title": "Goal Radius"
    },
    "interval": {
      "type": "integer",
      "default": 120,
      "description": "A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal",
      "title": "Interval"
    },
    "on_home": {
      "description": "Event(s) to run when this mob gets home.",
      "title": "On Home",
      "$ref": "../types/trigger.json"
    },
    "on_failed": {
      "title": "On Failed",
      "description": "Event(s) to run when this goal fails.",
      "type": "array",
      "items": {
        "$ref": "../types/event.json"
      }
    },
    "calculate_new_path_radius": {
      "title": "Calculate New Path Radius",
      "type": "number",
      "default": 2.0,
      "description": "Distance in blocks that the mob is considered close enough to the end of the current path. A new path will then be calculated to continue toward home."
    }
  },
  "examples": [
    {
      "goal_radius": 0.5,
      "interval": 120
    }
  ]
}
