{
    "format_version": "1.8.0",
    "minecraft:spawn_rules": {
        "description": {
            "identifier": "hoh_bht:treasure_chest",
            "population_control": "ambient"
        },
        "conditions": [
            {
                "minecraft:spawns_underground": {},
                "minecraft:distance_filter": {
                    "min": 8,
                    "max": 20
                  },
                "minecraft:brightness_filter": {
                    "min": 0,
                    "max": 4,
                    "adjust_for_weather": true
                },
                "minecraft:height_filter": {
                    "min": -63,
                    "max": 63
                },
                "minecraft:weight": {
                    "default": 15
                },
                "minecraft:herd": [
                    {
                      "min_size": 1,
                      "max_size": 1,
                      "event": "hoh_bht:small_chest"
                    },
                    {
                      "min_size": 1,
                      "max_size": 1,
                      "event": "hoh_bht:medium_chest"
                    },
                    {
                      "min_size": 1,
                      "max_size": 1,
                      "event": "hoh_bht:big_chest"
                    }
                  ],
                "minecraft:density_limit": {
                    "underground": 6
                },
                "minecraft:biome_filter": {
                    "test": "has_biome_tag",
                    "operator": "==",
                    "value": "animal"
                }
            }
        ]
    }
}