{
   "format_version":"1.21.0",
   "minecraft:entity":{
      "description":{
         "identifier":"true:sos_fire",
         "spawn_category":"creature",
         "is_spawnable":true,
         "is_summonable":true
      },
      "component_groups":{
         "true:default":{
            "minecraft:interact":{
               "interactions":[
                  {
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_equipment",
                                 "subject":"other",
                                 "domain":"hand",
                                 "value":"true:smoke_log_blue"
                              }
                           ]
                        },
                        "event":"true:start_smoke_blue",
                        "target":"self"
                     },
                     "use_item":true,
                     "interact_text":"action.interact.use"
                  },
                  {
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_equipment",
                                 "subject":"other",
                                 "domain":"hand",
                                 "value":"true:smoke_log_green"
                              }
                           ]
                        },
                        "event":"true:start_smoke_green",
                        "target":"self"
                     },
                     "use_item":true,
                     "interact_text":"action.interact.use"
                  },
                  {
                     "hurt_item":1,
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_tag",
                                 "subject":"other",
                                 "operator":"equals",
                                 "value":"breaking_tool"
                              }
                           ]
                        },
                        "event":"true:pick_up",
                        "target":"self"
                     },
                     "add_items":{
                        "table":"loot_tables/pick_ups/sos_fire.json"
                     },
                     "use_item":false,
                     "play_sounds":"saddle",
                     "interact_text":"action.interact.pick_up"
                  }
               ]
            }
         },
         "true:smoking_blue":{
            "minecraft:is_saddled":{
               
            },
            "minecraft:timer":{
               "looping":false,
               "randomInterval":false,
               "time":20,
               "time_down_event":{
                  "event":"true:to_reset_blue"
               }
            },
            "minecraft:interact":{
               "interactions":[
                  {
                     "hurt_item":1,
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_tag",
                                 "subject":"other",
                                 "operator":"equals",
                                 "value":"breaking_tool"
                              }
                           ]
                        },
                        "event":"true:pick_up",
                        "target":"self"
                     },
                     "add_items":{
                        "table":"loot_tables/pick_ups/sos_fire.json"
                     },
                     "use_item":false,
                     "play_sounds":"saddle",
                     "interact_text":"action.interact.pick_up"
                  }
               ]
            }
         },
         "true:smoking_green":{
            "minecraft:is_sheared":{
               
            },
            "minecraft:timer":{
               "looping":false,
               "randomInterval":false,
               "time":20,
               "time_down_event":{
                  "event":"true:to_reset_green"
               }
            },
            "minecraft:interact":{
               "interactions":[
                  {
                     "hurt_item":1,
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_tag",
                                 "subject":"other",
                                 "operator":"equals",
                                 "value":"breaking_tool"
                              }
                           ]
                        },
                        "event":"true:pick_up",
                        "target":"self"
                     },
                     "add_items":{
                        "table":"loot_tables/pick_ups/sos_fire.json"
                     },
                     "use_item":false,
                     "play_sounds":"saddle",
                     "interact_text":"action.interact.pick_up"
                  }
               ]
            }
         },
         "true:despawn":{
            "minecraft:transformation":{
               "into":"true:despawn"
            }
         },
         "true:reset":{
            "minecraft:transformation":{
               "into":"true:sos_fire<true:to_default>"
            }
         }
      },
      "components":{
         "minecraft:type_family":{
            "family":[
               "sos_fire"
            ]
         },
         "minecraft:collision_box":{
            "width":0.5,
            "height":0.5
         },
         "minecraft:damage_sensor":{
            "triggers":[
               {
                  "on_damage":{
                     "filters":{
                        "test":"is_family",
                        "subject":"other",
                        "value":"player"
                     }
                  },
                  "deals_damage":false
               }
            ]
         },
         "minecraft:health":{
            "value":99999,
            "max":99999
         },
         "minecraft:nameable":{
            
         },
         "minecraft:scale":{
            "value":1.0
         },
         "minecraft:knockback_resistance":{
            "value":100,
            "max":100
         },
         "minecraft:environment_sensor":{
            "triggers":[
               {
                  "filters":{
                     "all_of":[
                        {
                           "test":"on_ground",
                           "subject":"self",
                           "operator":"equals",
                           "value":true
                        }
                     ]
                  },
                  "event":"true:fire_damage"
               }
            ]
         },
         "minecraft:physics":{
            
         }
      },
      "events":{
         "minecraft:entity_spawned":{
            "add":{
               "component_groups":[
                  "true:default"
               ]
            }
         },
         "true:to_default":{
            "add":{
               "component_groups":[
                  "true:default"
               ]
            }
         },
         "true:start_smoke_blue":{
            "add":{
               "component_groups":[
                  "true:smoking_blue"
               ]
            },
            "remove":{
               "component_groups":[
                  "true:default"
               ]
            }
         },
         "true:start_smoke_green":{
            "add":{
               "component_groups":[
                  "true:smoking_green"
               ]
            },
            "remove":{
               "component_groups":[
                  "true:default"
               ]
            }
         },
         "true:pick_up":{
            "add":{
               "component_groups":[
                  "true:despawn"
               ]
            }
         },
         "true:to_reset_blue":{
            "sequence":[
               {
                  "randomize":[
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~4"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~8"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~-4"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~-8"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~16"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~-16"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~20"
                           ]
                        }
                     },
                     {
                        "weight":100,
                        "add":{
                           "component_groups":[
                              "true:reset"
                           ]
                        },
                        "queue_command":{
                           "command":[
                              "summon true:supply_crate ~ ~100 ~-20"
                           ]
                        }
                     }
                  ]
               }
            ]
         },
         "true:to_reset_green":{
            "add":{
               "component_groups":[
                  "true:reset"
               ]
            },
            "queue_command":{
               "command":[
                  "summon true:soldier ~ ~ ~4",
                  "summon true:soldier ~ ~ ~-4",
                  "summon true:soldier ~4 ~ ~",
                  "summon true:soldier ~-4 ~ ~"
               ]
            }
         },
         "true:fire_damage":{
            "queue_command":{
               "command":[
                  "damage @e [family=!sos_fire,r=1] 1 fire"
               ]
            }
         }
      }
   }
}