{
  "format_version": "1.20.50",
  "minecraft:entity": {
    "description": {
      "identifier": "cc_alien:drone",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          {
            "levitate": "!(query.property(\u0027cc_alien:crashed\u0027))"
          },
          "crash_on_damage"
        ]
      },
      "animations": {
        "levitate": "controller.animation.cc_alien.drone.levitate",
        "wait_15sec": "animation.cc_alien.drone.wait_15sec",
        "crash_on_damage": "controller.animation.cc_alien.drone.crash_on_damage"
      },
      "properties": {
        "cc_alien:crashed": {
          "default": false,
          "type": "bool",
          "client_sync": true
        }
      }
    },
    "components": {
      "minecraft:health": {
        "min": 9,
        "max": 25
      },
      "minecraft:ambient_sound_interval": {
        "event_name": "ambient",
        "value": 2.0
      },
      "minecraft:experience_reward": {
        "on_death": "1"
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": false
          }
        ]
      },
      "minecraft:loot": {
        "table": "loot_tables/cc/alien/entities/drone.json"
      },
      "minecraft:type_family": {
        "family": [
          "cc_alien_monster"
        ]
      }
    },
    "component_groups": {
      "attack": {
        "minecraft:shooter": {
          "def": "cc_alien:goo_projectile"
        },
        "minecraft:behavior.ranged_attack": {
          "priority": 3,
          "charge_charged_trigger": 4.0,
          "charge_shoot_trigger": 2.0,
          "attack_radius": 64.0
        },
        "minecraft:behavior.nearest_attackable_target": {
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "operator": "equals",
                "subject": "other",
                "value": "monster"
              },
              "max_dist": 30
            },
            {
              "filters": {
                "test": "is_family",
                "operator": "equals",
                "subject": "other",
                "value": "cc_alien_friend"
              },
              "max_dist": 30
            },
            {
              "filters": {
                "test": "is_family",
                "operator": "equals",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 50
            }
          ],
          "priority": 2,
          "must_see": true,
          "within_radius": 64.0,
          "must_see_forget_duration": 60.0,
          "must_reach": false,
          "attack_interval": 10
        },
        "minecraft:lookat": {
          "look_cooldown": [
            5.0,
            5.0
          ],
          "filters": {
            "any_of": [
              {
                "test": "is_family",
                "operator": "equals",
                "subject": "other",
                "value": "player"
              },
              {
                "test": "is_family",
                "operator": "equals",
                "subject": "other",
                "value": "cc_alien_friend"
              }
            ]
          },
          "search_radius": 45.0,
          "set_target": true
        },
        "minecraft:behavior.look_at_entity": {
          "priority": 4,
          "look_distance": 64.0,
          "probability": 1.0
        },
        "minecraft:behavior.hurt_by_target": {
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "operator": "equals",
                    "subject": "other",
                    "value": "player"
                  }
                ]
              }
            }
          ],
          "priority": 1
        }
      },
      "movement": {
        "minecraft:physics": {},
        "minecraft:pushable": {},
        "minecraft:collision_box": {
          "height": 1.0,
          "width": 1.5
        },
        "minecraft:follow_range": {
          "value": 64,
          "max": 64
        },
        "minecraft:navigation.float": {
          "can_path_over_water": true
        },
        "minecraft:behavior.float_wander": {
          "priority": 3,
          "xz_dist": 7,
          "y_dist": 5,
          "y_offset": -0.1,
          "float_duration": true
        },
        "minecraft:behavior.float": {
          "priority": 0
        },
        "minecraft:can_fly": {},
        "minecraft:jump.static": {},
        "minecraft:movement": {
          "value": 0.03
        }
      },
      "crashed": {
        "minecraft:health": {
          "min": 0,
          "max": 10
        },
        "minecraft:knockback_resistance": {
          "value": 1.0
        },
        "minecraft:pushable": {
          "is_pushable": false,
          "is_pushable_by_piston": true
        },
        "minecraft:movement.basic": {},
        "minecraft:movement": {
          "value": 0
        }
      },
      "variant_0": {
        "minecraft:skin_id": {
          "value": 0
        }
      },
      "variant_1": {
        "minecraft:skin_id": {
          "value": 1
        }
      },
      "variant_2": {
        "minecraft:skin_id": {
          "value": 2
        }
      },
      "variant_3": {
        "minecraft:skin_id": {
          "value": 3
        }
      },
      "variant_4": {
        "minecraft:skin_id": {
          "value": 4
        }
      },
      "variant_5": {
        "minecraft:skin_id": {
          "value": 5
        }
      },
      "variant_6": {
        "minecraft:skin_id": {
          "value": 6
        }
      },
      "variant_7": {
        "minecraft:skin_id": {
          "value": 7
        }
      },
      "variant_8": {
        "minecraft:skin_id": {
          "value": 8
        }
      }
    },
    "events": {
      "on_crash": {
        "remove": {
          "component_groups": [
            "movement",
            "attack"
          ]
        },
        "add": {
          "component_groups": [
            "crashed"
          ]
        },
        "set_property": {
          "cc_alien:crashed": true
        }
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "movement",
                "attack"
              ]
            }
          },
          {
            "randomize": [
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_0"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_1"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_2"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_3"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_4"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_5"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_6"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_7"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "variant_8"
                  ]
                }
              }
            ]
          }
        ]
      }
    }
  }
}