
LootJS.modifiers((event) => {
    
    if (global.nukelist.length > 0) {
      for (const entry of global.nukelist) {
         event.addLootTypeModifier(LootType.CHEST).removeLoot(entry)
         event.addLootTypeModifier(LootType.BLOCK).removeLoot(entry)
         event.addLootTypeModifier(LootType.ENTITY).removeLoot(entry)
         event.addLootTypeModifier(LootType.FISHING).removeLoot(entry)
         event.addLootTypeModifier(LootType.GIFT).removeLoot(entry)
         event.addLootTypeModifier(LootType.PIGLIN_BARTER).removeLoot(entry)
         event.addLootTypeModifier(LootType.ADVANCEMENT_ENTITY).removeLoot(entry)
         event.addLootTypeModifier(LootType.ADVANCEMENT_REWARD).removeLoot(entry)
         event.addLootTypeModifier(LootType.UNKNOWN).removeLoot(entry)
      }
   }

    ///==================================Enchanted Books==========================

    event.addLootTypeModifier([
        LootType.CHEST,
        LootType.PIGLIN_BARTER,
        LootType.FISHING
        ]).replaceLoot("minecraft:enchanted_book","kubejs:enchanting_rune")
        
    
    //=======================================Charm of Keeping=======================

    event.addLootTypeModifier([
        LootType.CHEST,
        LootType.PIGLIN_BARTER,
        LootType.FISHING,
        LootType.ENTITY
        ])
        .replaceLoot("twilightforest:charm_of_keeping_1","2x thermal:bronze_ingot")
        .replaceLoot("twilightforest:charm_of_keeping_2","8x thermal:silver_ingot")
        .replaceLoot("twilightforest:charm_of_keeping_3","6x thermal:bronze_ingot")

    ///=======================================Replacing Junk

    event.addLootTypeModifier(LootType.CHEST)
        .replaceLoot("minecraft:stick","8x thermal:compost")
        .replaceLoot("minecraft:ice","fruitsdelight:hamimelon_popsicle")
        .replaceLoot("minecraft:snow","fruitsdelight:kiwi_popsicle")
        .replaceLoot("minecraft:flower_pot","immersive_weathering:mulch_block")
        .replaceLoot("minecraft:snowball","fruitsdelight:hamimelon_shaved_ice")
        .replaceLoot("minecraft:oak_sapling","immersive_weathering:mulch_block")
        .replaceLoot("minecraft:dark_oak_sapling","2x immersive_weathering:mulch_block")
        .replaceLoot("minecraft:acacia_sapling","3x immersive_weathering:mulch_block")
        .replaceLoot("minecraft:spruce_sapling","2x immersive_weathering:mulch_block")
        .replaceLoot("minecraft:birch_sapling","immersive_weathering:mulch_block")
        .replaceLoot("minecraft:jungle_sapling","2x immersive_weathering:mulch_block")
        .replaceLoot("minecraft:cherry_sapling","3x immersive_weathering:mulch_block")
        .replaceLoot("minecraft:cobbled_deepslate","alexsmobs:rocky_shell")
        .replaceLoot(/.*carpet.*/,"immersiveengineering:hemp_fabric")
        .replaceLoot("minecraft:rotten_flesh","immersive_weathering:mulch_block")
        .replaceLoot("minecraft:sand","farmersdelight:cod_roll")
        .replaceLoot("minecraft:stick","farmersdelight:organic_compost")
        .replaceLoot("minecraft:wheat","farmersdelight:dough")
        .replaceLoot("quark:moss_paste","immersive_weathering:golden_moss_clump")
        .replaceLoot("minecraft:glass_bottle","minecraft:honey_bottle")
        .replaceLoot("minecraft:sugar","thermal:copper_coin")
        .replaceLoot("#minecraft:candles","thermal:copper_coin")
        .replaceLoot("minecraft:paper","minecraft:ink_sac")
        .replaceLoot("#minecraft:flowers","immersive_weathering:mulch_block")
        .replaceLoot("supplementaries:goblet", "create:iron_sheet")
        .replaceLoot("minecraft:stone", "kubejs:stone_plate")
        .replaceLoot("minecraft:smooth_stone", "kubejs:stone_plate")
        .replaceLoot("minecraft:stone_bricks", "kubejs:stone_plate")
        .replaceLoot("minecraft:snow_block", "kubejs:water_infused_arcanum")
        .replaceLoot("minecraft:clay_ball", "kubejs:earth_infused_arcanum")
        .replaceLoot("minecraft:brick", "kubejs:earth_infused_arcanum")
        .replaceLoot("minecraft:dead_bush", Item.of('fruitsdelight:jelly_bread', '{JellyEffectRoot:["PEAR"]}'))
        .replaceLoot("minecraft:green_dye",'fruitsdelight:pear_with_rock_sugar')
        .replaceLoot("minecraft:yellow_dye",Item.of('fruitsdelight:jelly_bread', '{JellyEffectRoot:["PINEAPPLE"]}'))
        .replaceLoot("large_fern","kubejs:infused_iron_nugget")
        .replaceLoot("spruce_sign","kubejs:earth_infused_arcanum")
        .replaceLoot("supplementaries:ash","kubejs:fire_infused_arcanum")
        .replaceLoot("create:andesite_ladder","thermal:silver_ingot")
        .replaceLoot("create:brass_ladder","thermal:lead_ingot")
        
    // ====================================================Replacing Good Items
    event.addLootTypeModifier(LootType.CHEST)
        .replaceLoot("trident","kubejs:rusty_trident")
        .replaceLoot("netherite_ingot","netherite_scrap")
        .replaceLoot("netherite_block","6x netherite_scrap")
        .replaceLoot("aether:diamond_gloves","4x kubejs:diamond_plate")
        .replaceLoot("aether:iron_gloves","4x create:iron_sheet")
        .replaceLoot("vintageimprovements:redstone_module","comparator")
        .replaceLoot("minecraft:diamond_horse_armor", "create:iron_sheet")
        .replaceLoot("minecraft:golden_sword","create:golden_sheet")
        .replaceLoot("minecraft:golden_shovel","create:golden_sheet")
        .replaceLoot("minecraft:golden_pickaxe","create:golden_sheet")
        .replaceLoot("minecraft:golden_axe","create:golden_sheet")
        .replaceLoot("minecraft:golden_hoe","kubejs:gold_upgrade_smithing_template")
        .replaceLoot("minecraft:golden_helmet","create:golden_sheet")
        .replaceLoot("minecraft:golden_chestplate","3x create:golden_sheet")
        .replaceLoot("minecraft:golden_leggings","2x create:golden_sheet")
        .replaceLoot("minecraft:golden_boots","create:golden_sheet")
        .replaceLoot("aether:golden_knife","create:golden_sheet")
        .replaceLoot("minecraft:netherite_upgrade_smithing_template","kubejs:gold_upgrade_smithing_template")
        .replaceLoot("create:large_cogwheel","kubejs:wooden_gear")
        .replaceLoot("create:cogwheel","kubejs:wooden_gear")
        .replaceLoot("create:andesite_alloy", "kubejs:natural_clay_blend")
        .replaceLoot("minecraft:iron_horse_armor", "create:iron_sheet")
        .replaceLoot("minecraft:golden_horse_armor", "create:iron_sheet")
        .replaceLoot("irons_spellbooks:magic_cloth","kubejs:arcane_leather")
        .replaceLoot("ancient_aether:valkyrum_helmet","kubejs:skyseeker_upgrade_smithing_template")
        .replaceLoot("ancient_aether:valkyrum_boots","kubejs:skyseeker_upgrade_smithing_template")
        .replaceLoot("ancient_aether:valkyrum_chestplate","3x ancient_debris")
        .replaceLoot("ancient_aether:valkyrum_leggings","2x ancient_debris")
        .replaceLoot("ancient_aether:valkyrum_axe","2x irons_spellbooks:arcane_debris")
        .replaceLoot("ancient_aether:valkyrum_pickaxe","2x irons_spellbooks:arcane_debris")
        .replaceLoot("ancient_aether:valkyrum_gloves","irons_spellbooks:arcane_debris")
        .replaceLoot("ancient_aether:valkyrum_shovel","forbidden_arcanus:stella_arcanum")
        .replaceLoot("ancient_aether:valkyrum_sword","forbidden_arcanus:stella_arcanum")
        .replaceLoot("ancient_aether:valkyrum_hoe","forbidden_arcanus:stella_arcanum")

    event.addLootTableModifier(/.*irons_spellbooks.*/)
    .replaceLoot("irons_spellbooks:fireward_ring","irons_spellbooks:cinder_essence")

    // ====================================================Iron's
    event.addLootTableModifier("irons_spellbooks:chests/filler_storage_loot")
        .randomChance(0.9).addLoot("9x wizards_reborn:arcanum")
        .randomChance(0.1).addLoot("2x thermal:ruby");

    event.addLootTableModifier("irons_spellbooks:chests/wheat")
        .randomChance(0.1).addLoot('3x vintagedelight:cheese_wheel')
        .randomChance(0.25).addLoot('4x vintagedelight:overnight_oats')
        .randomChance(0.8).addLoot("4x vintagedelight:oatmeal")
        .randomChance(0.01).addLoot("vintagedelight:magic_peanut")
        .randomChance(0.05).addLoot("vintagedelight:century_egg");
    
    event.addLootTableModifier(/.*irons_spellbooks:chests.*/)
        .replaceLoot(Item.of('minecraft:potion', '{Potion:"minecraft:water"}'), "enigmaticlegacy:recall_potion");
    
    event.addLootTableModifier(/.*irons_spellbooks:chests.*/)
        .randomChance(0.4)
        .addLoot("2x enigmaticlegacy:recall_potion");

    event.addLootTableModifier(/.*irons_spellbooks:chests.*/)
        .randomChance(0.10)
        .addLoot("enigmaticlegacy:mending_mixture");
    

    // ====================================================IDAS
    
    event.addLootTableModifier(/.*idas:chests.*/)
        .replaceLoot("diamond_axe","diamond")
        .replaceLoot("diamond_pickaxe","2x diamond")
        .replaceLoot("diamond_shovel","diamond")
        .replaceLoot("diamond_hoe","diamond")
        .replaceLoot("diamond_sword","diamond")
        .replaceLoot("diamond_helmet","2x kubejs:diamond_plate")
        .replaceLoot("diamond_chestplate","4x kubejs:diamond_plate")
        .replaceLoot("diamond_leggings","3x kubejs:diamond_plate")
        .replaceLoot("diamond_boots","2x kubejs:diamond_plate")

    event.addLootTableModifier(/.*idas:chests.*/)
        .randomChance(0.5)
        .addLoot("3x enigmaticlegacy:recall_potion");

    event.addLootTableModifier(/.*idas:chests.*/)
        .randomChance(0.15)
        .addLoot("enigmaticlegacy:mending_mixture");

    event.addLootTableModifier("minecraft:chests/jungle_temple")
        .randomChance(0.75)
        .addLoot("forbidden_arcanus:nipa");

    event.addLootTableModifier(/idas:chests\/desert_pyramid.*/)
        .randomChance(0.9)
        .addLoot("vintageimprovements:redstone_module");

    //======================================================== Dungeons Arise

    event.addLootTableModifier(/.*dungeons_arise:chests.*/)
        .replaceLoot("diamond_axe","diamond")
        .replaceLoot("diamond_pickaxe","2x diamond")
        .replaceLoot("diamond_shovel","diamond")
        .replaceLoot("diamond_hoe","diamond")
        .replaceLoot("diamond_sword","diamond")
        .replaceLoot("diamond_helmet","2x kubejs:diamond_plate")
        .replaceLoot("diamond_chestplate","4x kubejs:diamond_plate")
        .replaceLoot("diamond_leggings","3x kubejs:diamond_plate")
        .replaceLoot("diamond_boots","2x kubejs:diamond_plate")

    event.addLootTableModifier(/.*dungeons_arise:chests.*/)
        .randomChance(0.5)
        .addLoot("3x enigmaticlegacy:recall_potion")
        .randomChance(0.25)
        .addLoot("5x enigmaticlegacy:recall_potion")
        .randomChance(0.05)
        .addLoot("enigmaticlegacy:mending_mixture")
        .randomChance(0.025)
        .addLoot("3x enigmaticlegacy:mending_mixture")
        .randomChance(0.1)
        .addLoot("aether:leather_gloves")
    //===================================================Rare Loot
    event.addLootTableModifier(/.*chests\/village.*/)
        .randomChance(0.1)
        .addLoot("2x farmersdelight:organic_compost");

    event.addLootTypeModifier([LootType.CHEST])
        .anyBiome("#forge:is_swamp","#forge:is_wet") 
        .randomChance(0.05)
        .addLoot("kubejs:frog_totem")

    event.addLootTypeModifier(LootType.CHEST)
        .anyBiome("#forge:is_swamp","#forge:is_wet") 
        .randomChance(0.05)
        .addLoot(Item.of('supplementaries:cage', '{BlockEntityTag:{MobHolder:{EntityData:{Pos:[0.5d,0.20009998807907103d,0.5d],id:"alexsmobs:anaconda"},Name:"Anaconda",UUID:[I;719858050,1469468379,-1314582237,-2119634646]}}}'));

    event.addLootTypeModifier(LootType.CHEST) 
        .anyBiome("#forge:is_plains","minecraft:is_forest") 
        .randomChance(0.05)
        .addLoot(Item.of('supplementaries:cage', '{BlockEntityTag:{MobHolder:{EntityData:{Pos:[0.5d,0.20009998807907103d,0.5d],id:"minecraft:sheep"},Name:"Sheep",UUID:[I;719838050,1469468379,-1314582237,-2119634646]}}}'));
    
    event.addLootTypeModifier(LootType.CHEST)
        .anyBiome("#forge:is_plains","minecraft:is_forest") 
        .randomChance(0.05)
        .addLoot(Item.of('supplementaries:cage', '{BlockEntityTag:{MobHolder:{EntityData:{Pos:[0.5d,0.20009998807907103d,0.5d],id:"minecraft:chicken"},Name:"Chicken",UUID:[I;719838050,1469468379,-1314582237,-2119634646]}}}'));
    
    event.addLootTypeModifier(LootType.CHEST)
        .anyBiome("#forge:is_plains","minecraft:is_forest")  
        .randomChance(0.05)
        .addLoot(Item.of('supplementaries:cage', '{BlockEntityTag:{MobHolder:{EntityData:{Pos:[0.5d,0.20009998807907103d,0.5d],id:"minecraft:pig"},Name:"Pig",UUID:[I;719838050,1469468379,-1314582237,-2119634646]}}}'));
    
    event.addLootTypeModifier(LootType.CHEST)
        .anyBiome("#forge:is_plains","minecraft:is_forest")  
        .randomChance(0.05)
        .addLoot(Item.of('supplementaries:cage', '{BlockEntityTag:{MobHolder:{EntityData:{Pos:[0.5d,0.20009998807907103d,0.5d],id:"minecraft:cow"},Name:"Cow",UUID:[I;719828050,1469468379,-1314582237,-2119634646]}}}'));

    event.addLootTypeModifier(LootType.CHEST)
        .randomChance(0.02)
        .addLoot(Item.of('naturesaura:aura_cache', '{aura:200000}'));
    
     event.addLootTypeModifier(LootType.CHEST)
        .biome("#minecraft:is_forest") 
        .randomChance(0.05)
        .addLoot("sophisticatedstorage:upgrade_base");

    ///============================================= END REMASTERED

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#minecraft:is_beach") 
        .randomChance(0.025)
        .addLoot("endrem:black_eye");

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#minecraft:is_deep_ocean") 
        .randomChance(0.025)
        .addLoot("endrem:exotic_eye");

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#minecraft:is_forest") 
        .randomChance(0.025)
        .addLoot("endrem:corrupted_eye");

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#forge:is_cave") 
        .randomChance(0.025)
        .addLoot("endrem:lost_eye");

     event.addLootTypeModifier(LootType.CHEST)
        .anyDimension("minecraft:the_nether") 
        .randomChance(0.025)
        .addLoot("endrem:nether_eye");
        
    event.addLootTypeModifier(LootType.CHEST)
        .anyDimension("minecraft:the_nether") 
        .randomChance(0.025)
        .addLoot("endrem:cursed_eye");

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#forge:is_sandy") 
        .randomChance(0.025)
        .addLoot("endrem:old_eye");

    event.addLootTypeModifier(LootType.CHEST)
        .biome("#minecraft:is_jungle") 
        .randomChance(0.025)
        .addLoot("endrem:rouge_eye");
           
    event.addLootTableModifier(/.*minecraft:chests\/village.*/)
        .randomChance(0.025)
        .addLoot("endrem:evil_eye");

    event.addLootTableModifier(/.*minecraft:chests\/ancient.*/)
        .randomChance(0.085)
        .addLoot("endrem:cryptic_eye");
    //======================================================= Custom Stuff

    event.addLootTypeModifier([LootType.CHEST])
        .and((and) => {
            and.biome("#minecraft:is_forest").randomChance(0.25)
        })
        .addLoot(Item.of('minecraft:leather_chestplate', '{AttributeModifiers:[{Amount:10,AttributeName:"generic.max_health",Name:"generic.max_health",Operation:0,Slot:"chest",UUID:[I;-236697065,-5617923,-2001116034,-608749569]},{Amount:1,AttributeName:"puffish_attributes:player.axe_speed",Name:"generic.attack_damage",Operation:0,Slot:"chest",UUID:[I;-189118490,-261665280,-1270797720,314376330]}],Damage:0,Trim:{material:"minecraft:lapis",pattern:"ancient_aether:royal"},display:{Name:\'{"text":"Lumberjack\\\'s Shirt","color":"dark_green","bold":true}\',color:11546150}}'))
    
    event.addLootTypeModifier([LootType.CHEST])
        .and((and) => {
            and.biome("#minecraft:is_savanna").randomChance(0.25)
        })
        .addLoot(Item.of('minecraft:leather_helmet', '{AttributeModifiers:[{Amount:2,AttributeName:"generic.armor",Name:"generic.armor",Operation:0,Slot:"head",UUID:[I;2089079096,-2049685849,-1333650003,724275160]},{Amount:2,AttributeName:"alembic:lightning_damage.resistance",Name:"generic.armor_toughness",Operation:0,Slot:"head",UUID:[I;1627639245,-28031523,-1683504156,382157949]},{Amount:1,AttributeName:"alembic:lightning_damage",Name:"generic.max_health",Operation:0,Slot:"head",UUID:[I;-831823483,-1026012736,-1142156795,721857813]}],Damage:0,display:{Name:\'{"text":"Thunder Cap","color":"dark_blue","bold":true}\',color:3898306}}'))
    
    event.addLootTypeModifier([LootType.CHEST])
        .and((and) => {
            and.biome("#forge:is_snowy").randomChance(0.25)
         })
         .addLoot(Item.of('minecraft:leather_boots', '{AttributeModifiers:[{Amount:2,AttributeName:"generic.armor",Name:"generic.armor",Operation:0,Slot:"feet",UUID:[I;454154958,2103133474,-1242695491,-485396269]},{Amount:2,AttributeName:"alembic:ice_damage.resistance",Name:"generic.armor_toughness",Operation:0,Slot:"feet",UUID:[I;-429574747,642403351,-1679343235,-1987867171]},{Amount:1,AttributeName:"generic.max_health",Name:"generic.max_health",Operation:0,Slot:"feet",UUID:[I;1174972107,1056001029,-1625354475,-1180550624]}],Damage:0,display:{Name:\'{"text":"Cozy Boots","color":"light_purple","bold":true}\',color:16383998}}'))
    
    event.addLootTypeModifier([LootType.CHEST])
        .and((and) => {
            and.biome("#forge:is_snowy").randomChance(0.25)
         })
         .addLoot("kubejs:mittens")
     //================================================ MOBS

    event.addEntityLootModifier("minecraft:zombie")
        .randomChance(0.0125)
        .addLoot("kubejs:wooden_crucifix")
        .randomChance(0.0125)
        .addLoot("kubejs:lesser_blood_ring");
    
    event.addEntityLootModifier("minecraft:skeleton")
        .randomChance(0.025)
        .addLoot(Item.of('minecraft:shield', '{AttributeModifiers:[{Amount:4,AttributeName:"alembic:true_damage.resistance",Name:"blood_res",Operation:0,Slot:"offhand",UUID:[I;-1557455832,876039081,-1987753483,-1828574738]}],BlockEntityTag:{Base:7,Patterns:[{Color:8,Pattern:"ss"},{Color:8,Pattern:"bri"}],id:"minecraft:banner"},Damage:0,display:{Name:\'{"text":"Bone Shield","color":"#303837","bold":true}\'}}'))
    
    event.addEntityLootModifier("minecraft:pillager")
        .randomChance(0.01)
        .addLoot(Item.of('minecraft:crossbow', '{AttributeModifiers:[{Amount:2,AttributeName:"attributeslib:draw_speed",Name:"sa",Operation:1,Slot:"mainhand",UUID:[I;1092535222,-450213868,-2139553788,1708566011]},{Amount:-0.95d,AttributeName:"attributeslib:arrow_damage",Name:"rea",Operation:1,Slot:"mainhand",UUID:[I;-1366993219,-935376953,-1925440782,-1055852673]}],Charged:0b,ChargedProjectiles:[],Damage:0,display:{Name:\'{"text":"Utility Crossbow","color":"green"}\'}}'))

    event.addEntityLootModifier("twilightforest:skeleton_druid")
        .randomChance(0.0125)
        .addLoot("kubejs:lesser_nature_ring")
    
    //================================================ BLOCKS
    
    event.addBlockLootModifier("#forge:tall_grass")
        .matchMainHand("#forge:tools/knives")
        .randomChanceWithEnchantment("minecraft:looting", [0.1, 0.15, 0.2, 0.25]) 
        .addLoot("farmersdelight:straw")

    event.addBlockLootModifier("kubejs:charged_copper_block")
        .replaceLoot("kubejs:charged_copper_block","minecraft:copper_block")
        
  
    event.addLootTypeModifier(LootType.CHEST)
        .replaceLoot("enigmaticlegacy:forbidden_fruit","enchanted_golden_apple")
    
    //============================================= Templates

    event.addBlockLootModifier("stone")
    .randomChance(0.001)
    .addLoot("kubejs:bronze_upgrade_smithing_template")

    event.addBlockLootModifier("deepslate")
    .randomChance(0.002)
    .addLoot("kubejs:bronze_upgrade_smithing_template")

    event.addBlockLootModifier("#minecraft:logs")
    .randomChance(0.005)
    .addLoot("kubejs:steeleaf_upgrade_smithing_template")

    event.addLootTableModifier("immersiveengineering:chests/engineers_house")
    .randomChance(0.25)
    .addLoot("kubejs:engineer_upgrade_smithing_template")

    event.addLootTableModifier(/.*idas:chests\/tinkers_workshop\/tinkers_workshop.*/)
    .randomChance(0.25)
    .addLoot("kubejs:engineer_upgrade_smithing_template")

    event.addEntityLootModifier("twilightforest:hydra")
    .addLoot("kubejs:fiery_upgrade_smithing_template")

    event.addLootTableModifier(/.*twilightforest:chests\/hill.*/)
    .randomChance(0.075)
    .addLoot("kubejs:fiery_upgrade_smithing_template")

    event.addLootTypeModifier(LootType.CHEST)
    .replaceLoot([
        "deep_aether:stormforged_boots",
        "deep_aether:stormforged_leggings",
        "deep_aether:stormforged_chestplate",
        "deep_aether:stormforged_helmet",
        "deep_aether:stormforged_gloves",
        "deep_aether:storm_bow",
        "deep_aether:storm_sword"
    ],"deep_aether:stormforged_smithing_template")

    event.addEntityLootModifier([
        "minecraft:witch",
        "irons_spellbooks:necromancer",
        "twilightforest:skeleton_druid"])
    .randomChance(0.2)
    .addLoot("kubejs:wandering_magician_upgrade_smithing_template")
    
    event.addEntityLootModifier([
        "irons_spellbooks:pyromancer",
        "irons_spellbooks:priest",
        "irons_spellbooks:cultist",
        "irons_spellbooks:cryomancer",
        "irons_spellbooks:apothecarist",
        "irons_spellbooks:archevoker"])
    .randomChance(0.5)
    .addLoot("kubejs:scarecrow_upgrade_smithing_template")

    event.addLootTableModifier(/.*twilightforest:chests\/stronghold.*/)
    .randomChance(0.15)
    .addLoot("kubejs:knightmetal_upgrade_smithing_template")

    //=============================================== Keys
    
    event.addLootTableModifier("kubejs:chests/overworld_key")
    .randomChance(0.01)
    .addLoot("kubejs:overworld_key")

    event.addLootTableModifier("kubejs:chests/twilight_key")
    .randomChance(0.01)
    .addLoot("kubejs:twilight_key")
    
    event.addEntityLootModifier([
        "aether:slider",
        "aether:valkyrie_queen",
        "aether:sun_spirit",
        "ancient_aether:mutated_aechor_plant",
        "deep_aether:eots_controller"])
    .addLoot("kubejs:aether_key")

    event.addEntityLootModifier([
        "minecraft:wither",
        "alexsmobs:warped_mosco"])
    .addLoot("kubejs:nether_key")

    event.addEntityLootModifier(["minecraft:ender_dragon",
        "alexsmobs:void_worm"])
    .addLoot("kubejs:end_key")

    event.addEntityLootModifier("minecraft:evoker")
    .randomChance(0.05)
    .addLoot("kubejs:overworld_key")

    event.addEntityLootModifier([
        "irons_spellbooks:pyromancer",
        "irons_spellbooks:priest",
        "irons_spellbooks:cultist",
        "irons_spellbooks:cryomancer",
        "irons_spellbooks:apothecarist",
        "irons_spellbooks:archevoker"])
    .randomChance(0.25)
    .addLoot("kubejs:overworld_key")

    event.addEntityLootModifier([
        "minecraft:warden",
        "irons_spellbooks:dead_king"
    ])
    .addLoot("kubejs:overworld_key")


})