{
  "type": "minecraft:chest",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:arcane_essence",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 15
              }
            }
          ]
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.3
        }
      ]
    },
    {
      "rolls": {
        "min": 3,
        "max": 5
      },
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:scroll",
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.0,
                "max": 1.0
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:scroll",
          "functions": [
            {
              "function": "irons_spellbooks:randomize_spell",
              "quality": {
                "min": 0.0,
                "max": 1.0
              },
              "spell_filter": {
                "school": "irons_spellbooks:ender"
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:blank_rune"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.3
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "irons_spellbooks:magic_items/basic_curios"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.5
        }
      ]
    },
    {
      "rolls": 5,
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "irons_spellbooks:magic_items/good_ink"
        },
        {
          "type": "minecraft:empty"
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:ancient_knowledge_fragment",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 3
              }
            }
          ]
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.80
        }
      ]
    }
  ]
}
