{
  "pools": [
    {
      "rolls": {
        "type": "minecraft:binomial",
        "n": {
          "type": "minecraft:storage",
          "storage": "mt:settings",
          "path": "loot_table_rolls.initial"
        },
        "p": {
          "type": "minecraft:score",
          "target": "this",
          "score": "mt.total",
          "scale": 0.000001
        }
      },
      "bonus_rolls": {
        "min": 1,
        "max": 6
      },
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "mt:charms/common",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.02
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:enchanted_book",
          "weight": 1,
          "quality": 1,
          "functions": [
            {
              "function": "set_components",
              "components": {
                "minecraft:stored_enchantments": {
                    "minecraft:unbreaking": 2
                }
              }
            },
            {
              "function": "minecraft:set_count",
              "count": 1
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 600000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:bread",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 509999
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:bread",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:food": {
                  "nutrition": 7,
                  "saturation": 5,
                  "can_always_eat": false
                }
              }
            },
            {
              "function": "set_name",
              "name": [
                {
                  "text": "Normie Bread",
                  "color": "aqua",
                  "italic": false
                }
              ]
            },
            {
              "function": "set_lore",
              "lore": [
                {
                  "text": "Woah! Normie Bread? Gives one ",
                  "color": "gray",
                  "italic": false
                },
                {
                  "text": "extra hunger bar? Awesome! ",
                  "color": "gray",
                  "italic": false
                }
              ],
              "mode": "replace_all"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 510000
                }
              }
            },
            {
              "condition": "minecraft:value_check",
              "value": {
                "type": "minecraft:score",
                "target": {
                  "type": "minecraft:fixed",
                  "name": "$vanilla_mode"
                },
                "score": "mt.var"
              },
              "range": 0
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:string",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:oak_planks",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 520000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:oak_log",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 520000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:gunpowder",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2,
                "max": 4
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 550000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:iron_nugget",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 5,
              "conditions": [
                {
                  "condition": "minecraft:entity_scores",
                  "entity": "this",
                  "scores": {
                    "mt.total": {
                      "min": 501000
                    }
                  }
                }
              ]
            },
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 6
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 520000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:coal",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 5,
              "conditions": [
                {
                  "condition": "minecraft:entity_scores",
                  "entity": "this",
                  "scores": {
                    "mt.total": {
                      "min": 501000
                    }
                  }
                }
              ]
            },
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 6
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 520000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:gold_nugget",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 5,
              "conditions": [
                {
                  "condition": "minecraft:entity_scores",
                  "entity": "this",
                  "scores": {
                    "mt.total": {
                      "min": 501000
                    }
                  }
                }
              ]
            },
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 3,
                "max": 6
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "min": 520000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:experience_bottle",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 2
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:leather_helmet",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 12,
              "options": "#minecraft:in_enchanting_table"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 505000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:leather_chestplate",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 12,
              "options": "#minecraft:in_enchanting_table"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 505000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:leather_leggings",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 8,
              "options": "#minecraft:in_enchanting_table"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 505000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:leather_boots",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 12,
              "options": "#minecraft:in_enchanting_table"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 505000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:wooden_pickaxe",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 12,
              "options": "#minecraft:in_enchanting_table"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            },
            {
              "condition": "minecraft:entity_scores",
              "entity": "this",
              "scores": {
                "mt.total": {
                  "max": 505000
                }
              }
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:potion",
          "functions": [
            {
              "function": "minecraft:set_potion",
              "id": "minecraft:night_vision"
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.16
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:ender_pearl",
          "conditions": [
            {
              "condition": "minecraft:random_chance",
              "chance": 0.2
            }
          ]
        }
      ]
    }
  ]
}
