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

    "component_groups": {

      "geom_0":{
        "minecraft:variant": {
          "value": 0
        }
      },
      "geom_1":{
        "minecraft:variant": {
          "value": 1
        }  
      },
      "geom_2":{
        "minecraft:variant": {
          "value": 2
        }
      },
      "geom_3":{
        "minecraft:variant": {
          "value": 3
        }
      },

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

    "components": {
      "minecraft:collision_box": {
          "width": 1.5,
          "height": 1.5
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": {
                "all_of": [
                  { "test": "has_damage", "value": "fatal" }
                ]
              },
              "event": "detonation",
              "target": "self"
            }
          }
        ]
      },
      "minecraft:health": {
        "value": 3,
        "max": 3
      },
      "minecraft:type_family": {
        "family": [ "barrel" ]
      },
      "minecraft:nameable": {},
      "minecraft:pushable": {
        "is_pushable": false
      },
      "minecraft:knockback_resistance": {
        "value": 10.0
      },
	    "minecraft:physics": {},
      "minecraft:movement.basic":{}
    },

    "events":{
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "randomize": [
              {
                "weight": 1,
                "add": { "component_groups": [ "geom_0" ] }
              },
              {
                "weight": 1,
                "add": { "component_groups": [ "geom_1" ] }
              },
              {
                "weight": 1,
                "add": { "component_groups": [ "geom_2" ] }
              },
              {
                "weight": 1,
                "add": { "component_groups": [ "geom_3" ] }
              }
            ]
          }
        ] 
      },

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