LootJS.modifiers((event) => {
    event
        .addLootTableModifier("minecraft:entities/warden")
        .randomChance(0.5)
        .addLoot("endrem:corrupted_eye");
    event
        .addLootTableModifier("aquamirae:entities/captain_cornelia")
        .randomChance(0.5)
        .addLoot("endrem:black_eye");
    event
        .addLootTableModifier("cataclysm:entities/the_harbinger")
        .randomChance(0.5)
        .addLoot("endrem:lost_eye");
    event
        .addLootTableModifier("cataclysm:entities/the_leviathan")
        .randomChance(0.5)
        .addLoot("endrem:cursed_eye");
    event
        .addLootTableModifier("cataclysm:entities/netherite_monstrosity")
        .randomChance(0.5)
        .addLoot("endrem:rogue_eye");
    event
        .addLootTableModifier("cataclysm:entities/ancient_remnant")
        .randomChance(0.5)
        .addLoot("endrem:old_eye");
    event
        .addLootTableModifier("cataclysm:entities/ignis")
        .randomChance(0.5)
        .addLoot("endrem:nether_eye");
    event
        .addLootTableModifier("mowziesmobs:entities/frostmaw")
        .randomChance(0.5)
        .addLoot("endrem:cold_eye");
    event
        .addLootTableModifier("ars_nouveau:entities/wilden_boss")
        .randomChance(0.5)
        .addLoot("endrem:evil_eye");
    event
        .addLootTableModifier("born_in_chaos_v1:entities/pumpkinhead")
        .randomChance(0.5)
        .addLoot("endrem:undead_eye");
    event
        .addLootTableModifier("irons_spellbooks:entities/dead_king")
        .randomChance(0.5)
        .addLoot("endrem:witch_eye");
    event
        .addLootTableModifier("aquamirae:entities/maze_mother")
        .randomChance(0.5)
        .addLoot("endrem:exotic_eye");
    event
        .addLootTableModifier("cataclysm:entities/maledictus")
        .randomChance(0.5)
        .addLoot("endrem:cryptic_eye");
    event
        .addLootTableModifier("minecraft:entities/hoglin")
        .removeLoot("minecraft:leather");
    event
        .addLootTableModifier("minecraft:entities/skeleton_horse")
        .removeLoot("endrem:undead_soul");
    event
        .addLootTableModifier("minecraft:entities/witch")
        .removeLoot("endrem:witch_pupil");
    event
        .addLootTableModifier("minecraft:entities/wither")
        .removeLoot("endrem:wither_eye");
    event
        .addLootTableModifier("minecraft:entities/evoker")
        .removeLoot("endrem:magical_eye");
    event
        .addLootTableModifier("minecraft:entities/wither")
        .randomChance(0.5)
        .addLoot("endrem:wither_eye");
    event
        .addLootTableModifier("mowziesmobs:entities/wroughtnaut")
        .randomChance(0.5)
        .addLoot("endrem:magical_eye");
    const entities = [
        "minecraft:entities/warden",
        "alexsmobs:entities/void_worm",
        "alexsmobs:entities/murmur",
        "alexsmobs:entities/warped_mosco",
        "aquamirae:entities/captain_cornelia",
        "aquamirae:entities/maze_mother",
        "aquamirae:entities/eel",
        "ars_nouveau:entities/wilden_boss",
        "ars_nouveau:entities/wilden_stalker",
        "ars_nouveau:entities/wilden_hunter",
        "ars_nouveau:entities/wilden_guardian",
        "born_in_chaos_v1:entities/pumpkinhead",
        "born_in_chaos_v1:entities/skeleton_thrasher",
        "born_in_chaos_v1:entities/supreme_bonescaller",
        "born_in_chaos_v1:entities/bonescaller",
        "born_in_chaos_v1:entities/lifestealer",
        "born_in_chaos_v1:entities/missioner",
        "born_in_chaos_v1:entities/spiritof_chaos",
        "born_in_chaos_v1:entities/scarlet_persecutor",
        "born_in_chaos_v1:entities/dire_hound_leader",
        "born_in_chaos_v1:entities/fallen_chaos_knight",
        "cataclysm:entities/the_harbinger",
        "cataclysm:entities/the_leviathan",
        "cataclysm:entities/netherite_monstrosity",
        "cataclysm:entities/ancient_remnant",
        "cataclysm:entities/ignis",
        "cataclysm:entities/maledictus",
        "irons_spellbooks:entities/dead_king",
        "mowziesmobs:entities/frostmaw",
        "mowziesmobs:entities/wroughtnaut",
        "celestisynth:entities/traverser",
        "samurai_dynasty:entites/oni"
    ];
    entities.forEach(entity => {
        event
            .addLootTableModifier(entity)
            .randomChance(0.05)
            .addLoot("enicreo:essense_4");

        event
            .addLootTableModifier(entity)
            .randomChance(0.3)
            .addLoot("touhou_little_maid:power_point");
    });
    const mobs = [
        { mod: "minecraft", entity: "evoker", chance: 0.001 },
        { mod: "minecraft", entity: "piglin_brute", chance: 0.001 },
        { mod: "minecraft", entity: "ravager", chance: 0.001 },
        { mod: "quark", entity: "forgotten", chance: 0.0001 },
        { mod: "alexsmobs", entity: "sunbird", chance: 0.001 },
        { mod: "alexsmobs", entity: "warped_mosco", chance: 0.001 },
        { mod: "alexsmobs", entity: "farseer", chance: 0.001 },
        { mod: "alexsmobs", entity: "murmur", chance: 0.001 },
        { mod: "alexsmobs", entity: "underminer", chance: 0.001 },
        { mod: "alexsmobs", entity: "skreecher", chance: 0.001 },
        { mod: "aquamirae", entity: "captain_cornelia", chance: 0.05 },
        { mod: "born_in_chaos_v1", entity: "skeleton_thrasher", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "supreme_bonescaller", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "lifestealer", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "fallen_chaos_knight", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "bloody_gadfly", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "mother_spider", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "dire_hound_leader", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "glutton_fish", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "spiritof_chaos", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "nightmare_stalker", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "missioner", chance: 0.005 },
        { mod: "born_in_chaos_v1", entity: "sir_pumpkinhead", chance: 0.05 },
        { mod: "born_in_chaos_v1", entity: "lord_pumpkinhead_head", chance: 0.05 },
        { mod: "cataclysm", entity: "maledictus", chance: 0.005 },
        { mod: "cataclysm", entity: "ancient_remnant", chance: 0.05 },
        { mod: "cataclysm", entity: "the_leviathan", chance: 0.005 },
        { mod: "cataclysm", entity: "the_harbinger", chance: 0.05 },
        { mod: "cataclysm", entity: "ignis", chance: 0.005 },
        { mod: "cataclysm", entity: "ender_guardian", chance: 0.001 },
        { mod: "cataclysm", entity: "netherite_monstrosity", chance: 0.05 },
        { mod: "cataclysm", entity: "ender_golem", chance: 0.05 },
        { mod: "gnumus", entity: "gnumus_shaman", chance: 0.01 },
        { mod: "mowziesmobs", entity: "wroughtnaut", chance: 0.05 },
        { mod: "mowziesmobs", entity: "umvuthi", chance: 0.005 },
        { mod: "mowziesmobs", entity: "frostmaw", chance: 0.05 },
        { mod: "royalvariations", entity: "royal_zombie", chance: 0.001 },
        { mod: "royalvariations", entity: "royal_skeleton", chance: 0.001 },
        { mod: "royalvariations", entity: "royal_creeper", chance: 0.001 },
        { mod: "irons_spellbooks", entity: "keeper", chance: 0.01 },
        { mod: "irons_spellbooks", entity: "dead_king", chance: 0.05 },
        { mod: "irons_spellbooks", entity: "archevoker", chance: 0.01 },
        { mod: "irons_spellbooks", entity: "necromancer", chance: 0.001 },
        { mod: "irons_spellbooks", entity: "cryomancer", chance: 0.01 },
        { mod: "irons_spellbooks", entity: "pyromancer", chance: 0.01 },
        { mod: "irons_spellbooks", entity: "priest", chance: 0.01 },
        { mod: "irons_spellbooks", entity: "apothecarist", chance: 0.01 },
        { mod: "minecraft", entity: "ender_dragon", chance: 0.05 },
        { mod: "minecraft", entity: "wither", chance: 0.01 },
        { mod: "ars_nouveau", entity: "wilden_boss", chance: 0.001 },
        { mod: "aquamirae", entity: "maze_mother", chance: 0.05 },
        { mod: "minecraft", entity: "warden", chance: 0.005 },
        { mod: "minecraft", entity: "elder_guardian", chance: 0.001 }
    ];
    mobs.forEach(mob => {
        event
            .addLootTableModifier(`${mob.mod}:entities/${mob.entity}`)
            .randomChance(mob.chance)
            .addLoot('skilltree:wisdom_scroll');
    });
    const mobsWithDrops = [
        { mod: "cataclysm", entity: "ignis", chance: 0.3, drop: "cataclysm:ignitium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "ignited_revenant", chance: 0.1, drop: "cataclysm:ignitium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "ignited_berserker", chance: 0.05, drop: "cataclysm:ignitium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "maledictus", chance: 0.2, drop: "cataclysm:cursium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "royal_draugr", chance: 0.08, drop: "cataclysm:cursium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "elite_draugr", chance: 0.02, drop: "cataclysm:cursium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "aptrgangr", chance: 0.01, drop: "cataclysm:cursium_upgrade_smithing_template" },
        { mod: "cataclysm", entity: "draugr", chance: 0.005, drop: "cataclysm:cursium_upgrade_smithing_template" }
    ];
    mobsWithDrops.forEach((mob) => {
        event
            .addLootTableModifier(`${mob.mod}:entities/${mob.entity}`)
            .randomChance(mob.chance)
            .addLoot(mob.drop);
    });
    const mobsship_graveyard_echo = [
        { mod: "cataclysm", entity: "deepling", chance: 0.1 },
        { mod: "cataclysm", entity: "deepling_brute", chance: 0.1 },
        { mod: "cataclysm", entity: "deepling_angler", chance: 0.1 },
        { mod: "cataclysm", entity: "deepling_priest", chance: 0.1 },
        { mod: "cataclysm", entity: "deepling_warlock", chance: 0.1 },
        { mod: "cataclysm", entity: "lionfish", chance: 0.05 },
        { mod: "cataclysm", entity: "coral_golem", chance: 0.1 },
        { mod: "cataclysm", entity: "amethyst_crab", chance: 0.01 },
        { mod: "cataclysm", entity: "coralssus", chance: 0.1 },
        { mod: "born_in_chaos_v1", entity: "corpse_fish", chance: 0.01 },
        { mod: "born_in_chaos_v1", entity: "glutton_fish", chance: 0.1 },
        { mod: "minecraft", entity: "drowned", chance: 0.1 },
        { mod: "alexsmobs", entity: "skelewag", chance: 0.1 },
        { mod: "creeperoverhaul", entity: "ocean_creeper", chance: 0.1 }
    ];

    mobsship_graveyard_echo.forEach(mob => {
        event
            .addLootTableModifier(`${mob.mod}:entities/${mob.entity}`)
            .randomChance(mob.chance)
            .addLoot('aquamirae:ship_graveyard_echo');
    });
    event
        .addLootTableModifier(`cataclysm:entities/the_leviathan`)
        .addLoot('4x aquamirae:ship_graveyard_echo');
    event
        .addLootTableModifier("quark:entities/stoneling")
        .removeLoot("quark:diamond_heart");
    const samuraiDynastyMobs = [
        { mod: "samurai_dynasty", entity: "tanuki" },
        { mod: "samurai_dynasty", entity: "kawauso" },
        { mod: "samurai_dynasty", entity: "komainu" },
        { mod: "samurai_dynasty", entity: "oni" },
        { mod: "samurai_dynasty", entity: "enenra" },
        { mod: "samurai_dynasty", entity: "akaname" },
        { mod: "samurai_dynasty", entity: "onibi" },
        { mod: "samurai_dynasty", entity: "jorogumo" },
        { mod: "samurai_dynasty", entity: "kitsune_small" },
        { mod: "samurai_dynasty", entity: "kitsune" }
    ];
    samuraiDynastyMobs.forEach(mob => {
        event
            .addLootTableModifier(`${mob.mod}:entities/${mob.entity}`)
            .randomChance(0.1)
            .addLoot('samurai_dynasty:spirit_upgrade_smithing_template');
    });
});
