{
  "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.lay_egg",
  "description": "Allows the mob to lay an egg block on a sand block if the mob is pregnant.",
  "type": "object",
  "title": "Lay Egg",
  "additionalProperties": false,
  "required": [],
  "properties": {
    "priority": { "$ref": "types/priority.json" },
    "speed_multiplier": { "$ref": "types/speed_multiplier.json" },

    "allow_laying_from_below": {
      "title": "Allow Laying From Below",
      "type": "boolean",
      "default": false,
      "description": "[EXPERIMENTAL] Allows the mob to lay its eggs from below the target if it can't get there. This is useful if the target block is water with air above, since mobs may not be able to get to the air block above water."
    },
    "egg_type": {
      "title": "Egg Type",
      "$ref": "../../../../general/item/descriptor.json",
      "default": "minecraft:turtle_egg",
      "description": "[EXPERIMENTAL] Block type for the egg to lay. If this is a turtle egg, the number of eggs in the block is randomly set."
    },
    "goal_radius": {
      "title": "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"
    },
    "lay_egg_sound": {
      "title": "Lay Egg Sound",
      "$ref": "../../../../general/sound_event.json",
      "default": "lay_egg",
      "description": "Sound event name for laying egg. Defaulted to lay_egg which is used for Turtles."
    },
    "lay_seconds": {
      "title": "Lay Seconds",
      "type": "number",
      "default": 10.0,
      "description": "Duration of the laying egg process in seconds."
    },
    "on_lay": {
      "title": "On Lay",
      "$ref": "../types/trigger.json",
      "description": "Event to run when this mob lays the egg."
    },
    "search_height": {
      "title": "Search Height",
      "type": "integer",
      "default": 1,
      "description": "Height in blocks the mob will look for a target block to move towards."
    },
    "search_range": {
      "title": "Search Range",
      "type": "integer",
      "default": 0,
      "description": "The distance in blocks it will look for a target block to move towards."
    },
    "target_blocks": {
      "title": "Target Blocks",
      "type": "array",
      "default": ["minecraft:sand"],
      "items": { "title": "Block ID", "$ref": "../../../../general/item/descriptor.json" },
      "description": "Blocks that the mob can lay its eggs on top of."
    },
    "target_materials_above_block": {
      "title": "Target Materials Above Block",
      "type": "array",
      "default": ["Air"],
      "enum": ["Air", "Any", "Lava", "Water"],
      "description": "Types of materials that can exist above the target block. Valid types are Air, Water, and Lava."
    },
    "use_default_animation": {
      "title": "Use Default Animation",
      "type": "boolean",
      "default": true,
      "description": "Specifies if the default lay-egg animation should be played when the egg is placed or not."
    }
  },
  "examples": [
    {
      "goal_radius": 0.5,
      "search_height": 1,
      "search_range": 0
    }
  ]
}
