{
  "type": "origins:multiple",
  "name": "Конструкт",
  "description": "Поглощайте кости, чтобы становиться больше и сильнее.",
  "eat_bone": {
    "type": "origins:active_self",
    "condition": {
      "type": "origins:and",
      "conditions": [
        {
          "type": "origins:equipped_item",
          "equipment_slot": "mainhand",
          "item_condition": {
            "type": "origins:ingredient",
            "ingredient": { "item": "minecraft:bone" }
          }
        },
        {
          "type": "apoli:scoreboard",
          "objective": "undead_growth_level",
          "comparison": "<",
          "compare_to": 6
        }
      ]
    },
    "entity_action": {
      "type": "origins:and",
      "actions": [
        {
          "type": "origins:equipped_item_action",
          "equipment_slot": "mainhand",
          "action": { "type": "origins:consume", "amount": 1 }
        },
        {
          "type": "origins:execute_command",
          "command": "function undeadorigins:growth/bone"
        }
      ]
    },
    "cooldown": 10,
    "key": "key.use"
  },
  "on_respawn": {
    "type": "origins:action_on_callback",
    "event": "respawned",
    "entity_action": {
      "type": "origins:execute_command",
      "command": "function undeadorigins:growth/refresh"
    }
  },
  "periodic_refresh": {
    "type": "origins:action_over_time",
    "interval": 20,
    "entity_action": {
      "type": "origins:execute_command",
      "command": "function undeadorigins:growth/refresh"
    }
  }
}
