{
   "format_version":"1.21.0",
   "minecraft:entity":{
      "description":{
         "identifier":"true:supply_crate",
         "spawn_category":"creature",
         "is_spawnable":false,
         "is_summonable":true
      },
      "component_groups":{
         "true:default":{
            "minecraft:variant":{
               "value":0
            },
            "minecraft:timer":{
               "looping":false,
               "randomInterval":false,
               "time":11,
               "time_down_event":{
                  "event":"true:loot_dropped"
               }
            }
         },
         "true:dropped":{
            "minecraft:variant":{
               "value":1
            },
            "minecraft:is_saddled":{
               
            },
            "minecraft:interact":{
               "interactions":[
                  {
                     "hurt_item":1,
                     "spawn_items":{
                        "table":"loot_tables/supply_crate/supply_crate.json"
                     },
                     "on_interact":{
                        "filters":{
                           "any_of":[
                              {
                                 "test":"has_tag",
                                 "subject":"other",
                                 "operator":"equals",
                                 "value":"breaking_tool"
                              }
                           ]
                        },
                        "event":"true:loot_open",
                        "target":"self"
                     },
                     "use_item":false,
                     "play_sounds":"saddle",
                     "interact_text":"action.interact.open"
                  }
               ]
            }
         },
         "true:crate_open":{
            "minecraft:transformation":{
               "into":"true:supply_crate_open<true:to_default>"
            }
         }
      },
      "components":{
         "minecraft:type_family":{
            "family":[
               "supply_crate"
            ]
         },
         "minecraft:collision_box":{
            "width":1.0,
            "height":1.0
         },
         "minecraft:health":{
            "value":500,
            "max":500
         },
         "minecraft:scale":{
            "value":1.1
         },
         "minecraft:behavior.float":{
            "priority":0
         },
         "minecraft:damage_sensor":{
            "triggers":{
               "cause":"fall",
               "deals_damage":false
            }
         },
         "minecraft:knockback_resistance":{
            "value":100,
            "max":100
         },
         "minecraft:physics":{
            
         }
      },
      "events":{
         "minecraft:entity_spawned":{
            "add":{
               "component_groups":[
                  "true:default"
               ]
            },
            "queue_command":{
               "command":[
                  "execute as @s positioned ~ ~ ~ run effect @s slow_falling 11 6 true"
               ]
            }
         },
         "true:loot_dropped":{
            "remove":{
               "component_groups":[
                  "true:default"
               ]
            },
            "add":{
               "component_groups":[
                  "true:dropped"
               ]
            }
         },
         "true:loot_open":{
            "add":{
               "component_groups":[
                  "true:crate_open"
               ]
            }
         }
      }
   }
}