{
    "type": "minecraft:chest",
    "pools": [
      {
        "rolls": 8,
        "entries": [
          {
            "type": "minecraft:item",
            "weight": 5,
            "name": "irons_spellbooks:arcane_essence",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 3,
                  "max": 5
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 3,
            "name": "irons_spellbooks:arcane_ingot",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 1,
                  "max": 3
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "functions": [
              {
                "function": "minecraft:enchant_with_levels",
                "levels": 30.0,
                "treasure": true
              }
            ],
            "name": "minecraft:book",
            "weight": 2
          },
          {
            "type": "minecraft:tag",
            "weight": 1,
            "expand": true,
            "name": "irons_spellbooks:inscribed_rune",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 2,
                  "max": 5
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 1,
            "name": "irons_spellbooks:magic_cloth"
          },
          {
            "type": "minecraft:item",
            "weight": 3,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 2.0,
                  "max": 5.0,
                  "type": "minecraft:uniform"
                }
              }
            ],
            "name": "society:iron_sea_coin"
          },
          {
            "type": "minecraft:item",
            "weight": 2,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 1.0,
                  "max": 3.0,
                  "type": "minecraft:uniform"
                }
              }
            ],
            "name": "society:gold_sea_coin"
          },
          {
            "type": "minecraft:item",
            "weight": 4,
            "name": "minecraft:book",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 2,
                  "max": 6
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 3,
            "name": "minecraft:book",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 1,
                  "max": 6
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 2,
            "name": "minecraft:diamond",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 3,
                  "max": 5
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 0.01,
            "name": "irons_spellbooks:ruined_book"
          },
          {
            "type": "minecraft:item",
            "weight": 1,
            "name": "irons_spellbooks:upgrade_orb"
          },
          {
            "type": "minecraft:item",
            "weight": 2,
            "name": "irons_spellbooks:arcane_debris",
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": {
                  "min": 1,
                  "max": 4
                }
              }
            ]
          },
          {
            "type": "minecraft:item",
            "weight": 0.05,
            "name": "irons_spellbooks:evoker_spell_book"
          }
        ]
      },
      {
        "rolls": {
          "min": 1,
          "max": 3
        },
        "entries": [
          {
            "type": "minecraft:loot_table",
            "name": "irons_spellbooks:magic_items/random_potion_or_elixir"
          }
        ]
      },
      {
        "rolls": {
          "min": 2,
          "max": 7
        },
        "entries": [
          {
            "type": "minecraft:loot_table",
            "name": "irons_spellbooks:magic_items/good_ink"
          },          
          {
            "type": "minecraft:loot_table",
            "name": "irons_spellbooks:magic_items/great_ink"
          }
        ]
      },
      {
        "rolls": {
          "min": 0,
          "max": 2
        },
        "entries": [
          {
            "type": "minecraft:item",
            "name": "irons_spellbooks:scroll",
            "functions": [
              {
                "function": "irons_spellbooks:randomize_spell",
                "quality": {
                  "min": 0.3,
                  "max": 0.9
                }
              }
            ]
          }
        ]
      },
      {
        "rolls": 1,
        "entries": [
          {
            "type": "minecraft:loot_table",
            "name": "irons_spellbooks:magic_items/basic_curios"
          }
        ],
        "conditions": [
          {
            "condition": "minecraft:random_chance",
            "chance": 0.4
          }
        ]
      },
      {
        "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.5
          }
        ]
      }
    ]
  }
  