{
  "pools": [
    {
      "rolls": 4,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:book",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 24,
              "treasure": true
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:golden_apple",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:spyglass",
          "functions": [
            {
              "function": "minecraft:set_nbt",
              "tag": "{ic:magic_spyglass,Enchantments:[{}]}"
            },
            {
              "function": "minecraft:set_name",
              "name": [
                {
                  "text": "Magic Spyglass",
                  "color": "light_purple",
                  "italic": false
                }
              ]
            },
            {
              "function": "minecraft:set_lore",
              "lore": [
                {
                  "text": "Looking at a mob will ",
                  "color": "gray",
                  "italic": false
                },
                {
                  "text": "return its health. ",
                  "color": "gray",
                  "italic": false
                }
              ]
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.5
            }
          ]
        }
      ]
    }
  ]
}
