{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:rotten_spell_book"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.15
        }
      ]
    },
    {
      "rolls": 5,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:bone",
          "weight": 5,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 5
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:cobweb",
          "weight": 5
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:gold_ingot",
          "weight": 3,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 5
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond",
          "weight": 1
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:emerald",
          "weight": 1,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 3
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": {
        "min": 1,
        "max": 2
      },
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:scroll",
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.0,
                "max": 0.5
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:arcane_essence",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 5,
                "max": 16
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 2,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond_sword",
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.2,
                "max": 0.75
              }
            },
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 39.0,
                "min": 20.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_sword",
          "weight": 2,
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.2,
                "max": 0.75
              }
            },
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 39.0,
                "min": 20.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_sword",
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.2,
                "max": 0.75
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_helmet",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_chestplate",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_leggings",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:iron_boots",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond_helmet",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond_chestplate",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond_leggings",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:diamond_boots",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": {
                "type": "minecraft:uniform",
                "max": 20.0,
                "min": 10.0
              },
              "options": "#minecraft:on_random_loot"
            }
          ]
        },
        {
          "type": "minecraft:empty",
          "weight": 7
        }
      ]
    }
  ]
}
