// priority: 0

//Loot Table Modification

LootJS.modifiers((event) => {

    //Block
    
    event.addLootTableModifier("minecraft:blocks/stone").removeLoot('minecraft:cobblestone')
    event.addLootTableModifier("minecraft:blocks/stone").addLoot("strainers:stone_pebble").limitCount([1, 3])
    event.addLootTableModifier("caveopolis:blocks/black_colored_leaves").randomChance(0.025).addLoot("stoneopolis:void_apple")
    event.addLootTableModifier("stoneopolis:blocks/concrete_dust_pile").removeLoot('stoneopolis:concrete_dust_pile').addLoot("stoneopolis:concrete_dust").limitCount([2, 4])
    event.addLootTableModifier("stoneopolis:blocks/blank_colored_core_ore").removeLoot('stoneopolis:blank_colored_core_ore').addLoot("stoneopolis:blank_color_core").limitCount([1])

    event.addLootTableModifier("minecraft:blocks/campfire").removeLoot('minecraft:charcoal').addLoot("minecraft:campfire").limitCount([1])

    event.addLootTableModifier("minecraft:blocks/nether_gold_ore").removeLoot('minecraft:gold_nugget').addLoot("minecraft:nether_gold_ore")


    //Entity

    event.addLootTableModifier("minecraft:entities/endermite").addLoot("opolisutilities:ender_pearl_fragment").limitCount([1, 4])
    event.addLootTableModifier("minecraft:entities/magma_cube").addLoot("minecraft:magma_cream").limitCount([1, 2])
    event.addLootTableModifier("minecraft:entities/zombie").removeLoot("minecraft:iron_ingot").addLoot("stoneopolis:void_iron_ingot").randomChance(0.25)
    event.addLootTableModifier("minecraft:entities/drowned").removeLoot("minecraft:copper_ingot").addLoot("stoneopolis:void_copper_ingot").randomChance(0.25)

    event.addLootTableModifier("lava_monster:entities/lava_monster").randomChance(0.6).addLoot("minecraft:blaze_powder").limitCount([2, 4])
    event.addLootTableModifier("lava_monster:entities/lava_monster").randomChance(0.3).addLoot("reliquary:molten_core").limitCount([1, 1])
    event.addLootTableModifier("lava_monster:entities/lava_monster").removeLoot("minecraft:fire_charge")
    event.addLootTableModifier("lava_monster:entities/lava_monster").removeLoot("minecraft:coal")

    event.addLootTableModifier("minecraft:entities/wither_skeleton").addLoot("stoneopolis:nether_skull_fragment").limitCount([1, 3])

    //Loot Bags

    event.addLootTableModifier("opolisutilities:loot_boxes/basic_loot_box").removeLoot("minecraft:dirt")
    event.addLootTableModifier("opolisutilities:loot_boxes/basic_loot_box").addWeightedLoot(1, true, [

        LootEntry.of("minecraft:beetroot").limitCount([0, 2]),
        LootEntry.of("minecraft:carrot").limitCount([0, 3]),
        LootEntry.of("minecraft:melon_slice").limitCount([0, 1]),
        LootEntry.of("minecraft:pumpkin").limitCount([0, 1]),
        LootEntry.of("minecraft:potato").limitCount([0, 3]),
        LootEntry.of("minecraft:wheat_seeds").limitCount([0, 2]),
        LootEntry.of("farmersdelight:cabbage_seeds").limitCount([0, 2]),
        LootEntry.of("farmersdelight:tomato_seeds").limitCount([0, 2]),
        LootEntry.of("immersiveengineering:seed").limitCount([0, 2]),
        
        LootEntry.of("minecraft:stone").limitCount([0, 5]),
    ])

        
});
