{
  "format_version": "1.20.50",
  "minecraft:entity": {
    "description": {
      "identifier": "cc_alien:ufo_rideable",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          "ufo_fly",
          "ufo_movement"
        ]
      },
      "animations": {
        "ufo_fly": "controller.animation.cc_alien.ufo_rideable.ufo_fly",
        "ufo_movement": "controller.animation.cc_alien.ufo_rideable.ufo_movement"
      },
      "properties": {
        "cc_alien:shoot": {
          "default": false,
          "type": "bool",
          "client_sync": true
        }
      }
    },
    "components": {
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": true
      },
      "minecraft:collision_box": {
        "height": 2.0,
        "width": 2.0
      },
      "minecraft:input_ground_controlled": {},
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "all",
            "deals_damage": false
          }
        ]
      },
      "minecraft:movement.basic": {},
      "minecraft:interact": {
        "interactions": [
          {
            "interact_text": "action.interact.shoot",
            "on_interact": {
              "event": "on_shoot",
              "target": "self",
              "filters": {
                "all_of": [
                  {
                    "test": "is_riding",
                    "subject": "other"
                  },
                  {
                    "test": "bool_property",
                    "domain": "cc_alien:shoot",
                    "value": false
                  },
                  {
                    "test":"on_ground",
                    "subject": "self",
                    "operator": "!="
                  }
                ]
              }
            },
            "swing": true
          }
        ]
      },
      "minecraft:movement": {
        "value": 0.3
      },
      "minecraft:rideable": {
        "interact_text": "action.interact.ride.cc_alien:ufo_rideable",
        "seat_count": 1,
        "pull_in_entities": false,
        "family_types": [
          "player"
        ],
        "rider_can_interact": true,
        "seats": [
          {
            "position": [
              0.0,
              0.6,
              -0.2
            ],
            "min_rider_count": 0,
            "max_rider_count": 1
          }
        ]
      }
    },
    "component_groups": {
      "variant_0": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "variant_1": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "variant_2": {
        "minecraft:variant": {
          "value": 2
        }
      },
      "variant_3": {
        "minecraft:variant": {
          "value": 3
        }
      },
      "variant_4": {
        "minecraft:variant": {
          "value": 4
        }
      },
      "variant_5": {
        "minecraft:variant": {
          "value": 5
        }
      },
      "variant_6": {
        "minecraft:variant": {
          "value": 6
        }
      },
      "variant_7": {
        "minecraft:variant": {
          "value": 7
        }
      },
      "shoot": {
        "minecraft:timer": {
          "time": [
            0.55,
            0.6
          ],
          "time_down_event": {
            "event": "reset_shoot",
            "target": "self"
          },
          "looping": false
        },
        "minecraft:spawn_entity": {
          "entities": [
            {
              "min_wait_time": 0,
              "max_wait_time": 0,
              "spawn_entity": "cc_alien:tnt_projectile",
              "single_use": true,
              "num_to_spawn": 1,
              "should_leash": false,
              "spawn_event": "cc_alien:ufo_spawn"
            }
          ]
        },
        "minecraft:is_baby": {}
      }
    },
    "events": {
      "on_shoot": {
        "add": {
          "component_groups": [
            "shoot"
          ]
        },
        "set_property": {
          "cc_alien:shoot": true
        }
      },
      "reset_shoot": {
        "remove": {
          "component_groups": [
            "shoot"
          ]
        },
        "set_property": {
          "cc_alien:shoot": false
        }
      },
      "minecraft:entity_spawned": {
        "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"
              ]
            }
          }
        ]
      }
    }
  }
}