{
  "type": "minecraft:chest",
  "pools": [
    {
      "rolls": 4,
      "entries": [
        {
          "type": "minecraft:tag",
          "weight": 6,
          "name": "minecraft:candles",
          "expand": true,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 8
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 8,
          "name": "minecraft:gunpowder",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 12
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.375
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 12,
          "name": "minecraft:paper",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 4,
                "max": 11
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:book",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": {
                  "min": 1,
                  "max": 3
                }
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 5,
          "name": "minecraft:leather",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 8
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:bone_block",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 5
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 2,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:powder_snow_bucket",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:packed_ice",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 12
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 4,
          "name": "minecraft:blue_ice",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 7
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 5,
          "name": "minecraft:snowball",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 6
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": {
        "min": 1,
        "max": 2
      },
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 5,
          "name": "minecraft:iron_ingot",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 8
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.65
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 4,
          "name": "minecraft:gold_ingot",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 6
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.4
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 7,
          "name": "minecraft:copper_ingot",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 4,
                "max": 12
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:copper_block",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.5
                }
              ]
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 9,
          "name": "minecraft:iron_nugget",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 4,
                "max": 6
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 9,
          "name": "minecraft:gold_nugget",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 7,
                "max": 15
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:lapis_lazuli",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 7
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:diamond",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.1
            }
          ]
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:tag",
          "name": "terralith:spire/common_tools",
          "expand": true,
          "functions": [
            {
              "function": "minecraft:set_damage",
              "damage": {
                "min": 0,
                "max": 0.75
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.75
                }
              ]
            },
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "min": 5,
                "max": {
                  "min": 7,
                  "max": 24
                }
              },
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0.75
                }
              ]
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.75
            }
          ]
        }
      ]
    },
    {
      "rolls": 2,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:book",
          "functions": [
            {
              "function": "minecraft:enchant_randomly"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.125
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:book",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "min": 1,
                "max": 15
              },
              "treasure": false
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.125
            }
          ]
        }
      ]
    }
  ]
}
