{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [ 
        {
          "type": "minecraft:loot_table",
          "value": "magical_addons:blocks/wizarding_table",
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "maddons.block.loot_id": 11
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:dynamic",
              "name": "minecraft:contents",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "components": {
                      "minecraft:custom_data": {
                        "magical_addons": {
                          "extract_bsb_items": true
                        }
                      }
                    }
                  }
                }
              ]
            },
            {
              "type": "minecraft:item",
              "name": "minecraft:brown_shulker_box",
              "functions": [
                {
                  "function": "minecraft:copy_components",
                  "source": "block_entity",
                  "include": [
                    "minecraft:custom_name",
                    "minecraft:container",
                    "minecraft:lock",
                    "minecraft:container_loot"
                  ]
                },
                {
                  "function": "minecraft:set_contents",
                  "component": "minecraft:container",
                  "entries": [
                    {
                      "type": "minecraft:dynamic",
                      "name": "minecraft:contents"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "random_sequence": "minecraft:blocks/brown_shulker_box"
}