{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "lifeboat:gas_station",
      "runtime_identifier": "minecraft:ghast",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },

    "component_groups": {

      "detonation": {
        "minecraft:transformation": {
          "into": "lifeboat:explode_gas",
          "delay": {
            "value": 0
          }
        }
      },

      "turn_0":{
        "minecraft:mark_variant": {
          "value": 0
        }
      },
      "turn_1":{
        "minecraft:mark_variant": {
          "value": 1
        }
      },
      "turn_2":{
        "minecraft:mark_variant": {
          "value": 2
        }
      },
      "turn_3":{
        "minecraft:mark_variant": {
          "value": 3
        }
      },
      "turn_4":{
        "minecraft:mark_variant": {
          "value": 4
        }
      },
      "turn_5":{
        "minecraft:mark_variant": {
          "value": 5
        }
      },
      "turn_6":{
        "minecraft:mark_variant": {
          "value": 6
        }
      },
      "turn_7":{
        "minecraft:mark_variant": {
          "value": 7
        }
      }
      
    },

    "components": {
      "minecraft:collision_box": {
          "width": 0.5,
          "height": 2.0
      },
      "minecraft:damage_sensor": {
        "triggers": [

          {
            "on_damage": {
              "filters": {
                "all_of": [
                  { "test": "has_damage", "value": "fatal" }
                ]
              },
              "event": "detonation",
              "target": "self"
            }
          },

          {
            "on_damage": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "domain": "hand", "subject": "other", "value": "bone" }
                ]
              },
              "event": "rotate",
              "target": "self"
            },
            "deals_damage": false
          }

        ]
      },
      "minecraft:health": {
        "value": 6,
        "max": 6
      },
      "minecraft:type_family": {
        "family": [ "gas_station" ]
      },
      "minecraft:nameable": {},
      "minecraft:pushable": {
        "is_pushable": false
      },
      "minecraft:knockback_resistance": {
        "value": 10.0
      },
	    "minecraft:physics": {},
      "minecraft:movement.basic":{}
    },

    "events":{

      "detonation": {
        "add": {
          "component_groups": [
            "detonation"
          ]
        }
      },

      "rotate": {
        "sequence": [
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 0
            },
            "remove": {
              "component_groups": [
                "turn_0"
              ]
            },
            "add": {
              "component_groups": [
                "turn_1"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 1
            },
            "remove": {
              "component_groups": [
                "turn_1"
              ]
            },
            "add": {
              "component_groups": [
                "turn_2"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 2
            },
            "remove": {
              "component_groups": [
                "turn_2"
              ]
            },
            "add": {
              "component_groups": [
                "turn_3"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 3
            },
            "remove": {
              "component_groups": [
                "turn_3"
              ]
            },
            "add": {
              "component_groups": [
                "turn_4"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 4
            },
            "remove": {
              "component_groups": [
                "turn_4"
              ]
            },
            "add": {
              "component_groups": [
                "turn_5"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 5
            },
            "remove": {
              "component_groups": [
                "turn_5"
              ]
            },
            "add": {
              "component_groups": [
                "turn_6"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 6
            },
            "remove": {
              "component_groups": [
                "turn_6"
              ]
            },
            "add": {
              "component_groups": [
                "turn_7"
              ]
            }
          },
          {
            "filters": {
              "test": "is_mark_variant", 
              "value": 7
            },
            "remove": {
              "component_groups": [
                "turn_7"
              ]
            },
            "add": {
              "component_groups": [
                "turn_0"
              ]
            }
          }
        ]
      }

    }
  }
}
