// Removing loot from stuff
LootJS.modifiers((event) => {
    event.addLootTypeModifier(LootType.CHEST)
        .removeLoot('endrem:black_eye')
    .removeLoot('endrem:cold_eye')
    .removeLoot('endrem:corrupted_eye')
    .removeLoot('endrem:lost_eye')
    .removeLoot('endrem:nether_eye')
    .removeLoot('endrem:rogue_eye')
    .removeLoot('endrem:cursed_eye')
    .removeLoot('endrem:evil_eye')
    .removeLoot('endrem:guardian_eye')
    .removeLoot('endrem:magical_eye')
    .removeLoot('endrem:wither_eye')
    .removeLoot('endrem:witch_eye')
    .removeLoot('endrem:undead_eye')
    .removeLoot('endrem:exotic_eye')
    .removeLoot('endrem:cryptic_eye')
    .removeLoot('artifacts:flame_pendant')
    .removeLoot('artifacts:shock_pendant')
    .removeLoot('artifacts:obsidian_skull')
    .removeLoot('artifacts:antidote_vessel')
    .removeLoot('artifacts:bunny_hoppers')
    .removeLoot('artifacts:cross_necklace')
    .removeLoot('artifacts:panic_necklace')
    .removeLoot('artifacts:night_vision_goggles')
    .removeLoot('artifacts:pickaxe_heater')
    .removeLoot('artifacts:thorn_pendant')
    .removeLoot('artifacts:golden_hook')
    .removeLoot('artifacts:aqua_dashers')
    .removeLoot('artifacts:digging_claws')
    .removeLoot('relics:leather_belt')
    .removeLoot('relics:reflection_necklace')
    .removeLoot('relics:holy_locket')
    .removeLoot('relics:enders_hand')
    .removeLoot('relics:rage_glove')
    .removeLoot('relics:roller_skates')
    .removeLoot('relics:drowned_belt')
    .removeLoot('relics:magma_walker')
    .removeLoot('relics:midnight_robe')
    .removeLoot('artifacts:chorus_totem')
    .removeLoot('artifacts:superstitous_hat')
    .removeLoot('artifacts:power_glove')
    .removeLoot('artifacts:feral_claws')
    .removeLoot('artifacts:vampiric_gloves')
    .removeLoot('artifacts:crystal_heart')
    .removeLoot('artifacts:everlasting_beef')
    .removeLoot('artifacts:lucky_scarf')
    .removeLoot('artifacts:running_shoes')
    .removeLoot('artifacts:steadfast_spikes')
    .removeLoot('artifacts:cloud_in_a_bottle')
    .removeLoot('relics:space_dissector')
    .removeLoot('relics:infinity_ham')
    .removeLoot('relics:elytra_booster')
    .removeLoot('relics:magic_mirror');

    event.addEntityLootModifier('minecraft:witch')
    .removeLoot('endrem:witch_pupil');
});


// Adding loot to stuff
    //bosses that drop eyes
LootJS.modifiers(event => {
  event.addLootTableModifier('deeperdarker:entities/stalker')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:guardian_eye');
    });

    event.addLootTableModifier('cataclysm:entities/ignis')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:nether_eye');
    });

    event.addLootTableModifier('twilightforest:entities/snow_queen')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:cold_eye');
    });

    event.addLootTableModifier('eeeabsmobs:entities/immortal')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:lost_eye');
    });

    event.addLootTableModifier('cataclysm:entities/maledictus')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:evil_eye');
    });

    event.addLootTableModifier('cataclysm:entities/scylla')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:cursed_eye');
    });

    event.addLootTableModifier('cataclysm:entities/the_leviathan')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:exotic_eye');
    });

    event.addLootTableModifier('cataclysm:entities/ancient_remnant')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:old_eye');
    });

    event.addLootTableModifier('aquamirae:entities/captain_cornelia')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:black_eye');
    });

    event.addLootTableModifier('alexscaves:entities/forsaken')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:cryptic_eye');
    });

    event.addLootTableModifier('legendary_monsters:entities/cloud_golem')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:wither_eye');
    });

    event.addLootTableModifier('born_in_chaos_v1:entities/lord_pumpkinhead')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:magical_eye');
    });

    event.addLootTableModifier('mowziesmobs:entities/umvuthi')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:witch_eye');
    });

    event.addLootTableModifier('bosses_of_mass_destruction:entities/lich')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:rogue_eye');
    });

    event.addLootTableModifier('mowziesmobs:entities/frostmaw')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:undead_eye');
    });

    event.addLootTableModifier('mowziesmobs:entities/ferrous_wroughtnaut')
    .pool(pool => {
      pool.rolls(1);
      pool.addLoot('endrem:corrupted_eye');
    });
});

LootJS.modifiers((event) => {
    // Disable other mods' loot modifications for zombies (Forge-only)
    event.disableLootModification("minecraft:entities/zombie",
      "minecraft:entities/skeleton",
      "minecraft:entities/wither",
      "minecraft:entities/ender_dragon",
      "alexsmobs:entities/warped_mosco",
      "alexsmobs:entities/void_worm",
      "alexscaves:entities/luxtructosaurus",
      "alexscaves:entities/forsaken",
      "aquamirae:entities/captain_cornelia",
      "aquamirae:entities/maze_mother",
      "doom:entities/iconofsin",
      "doom:entities/gladiator",
      "doom:entities/motherdemon",
      "doom:entities/arch_maykr",
      "born_in_chaos_v1:entities/lord_pumpkinhead",
      "cataclysm:entities/ender_guardian",
      "cataclysm:entities/netherite_monstrosity",
      "cataclysm:entities/ignis",
      "cataclysm:entities/the_harbinger",
      "cataclysm:entities/the_leviathan",
      "cataclysm:entities/ancient_remnant",
      "cataclysm:entities/maledictus",
      "cataclysm:entities/scylla",
      "draconicevolution:entities/draconic_guardian",
      "twilightforest:entities/naga",
      "twilightforest:entities/lich",
      "twilightforest:entities/minoshroom",
      "twilightforest:entities/hydra",
      "twilightforest:entities/knight_phantom",
      "twilightforest:entities/ur_ghast",
      "twilightforest:entities/alpha_yeti",
      "twilightforest:entities/snow_queen",
      "witherstormmod:entities/wither_storm",
      "witherstormmod:entities/withered_symbiont",
      "deeperdarker:entities/stalker",
      "darkdoppelganger:entities/dark_doppelganger",
      "eeeabsmobs:entities/nameless_guardian",
      "eeeabsmobs:entities/immortal",
      "legendary_monsters:entities/cloud_golem",
      "mowziesmobs:entities/ferrous_wroughtnaut",
      "mowziesmobs:entities/umvuthi",
      "mowziesmobs:entities/frostmaw",
      "sculkhorde:entities/sculk_enderman"
    );

    event.addEntityLootModifier("minecraft:zombie",
      "minecraft:skeleton",
      "minecraft:wither",
      "minecraft:ender_dragon",
      "alexsmobs:warped_mosco",
      "alexsmobs:void_worm",
      "alexscaves:luxtructosaurus",
      "alexscaves:forsaken",
      "aquamirae:captain_cornelia",
      "aquamirae:maze_mother",
      "doom:iconofsin",
      "doom:gladiator",
      "doom:motherdemon",
      "doom:arch_maykr",
      "born_in_chaos_v1:lord_pumpkinhead",
      "cataclysm:ender_guardian",
      "cataclysm:netherite_monstrosity",
      "cataclysm:ignis",
      "cataclysm:the_harbinger",
      "cataclysm:the_leviathan",
      "cataclysm:ancient_remnant",
      "cataclysm:maledictus",
      "cataclysm:scylla",
      "draconicevolution:draconic_guardian",
      "twilightforest:naga",
      "twilightforest:lich",
      "twilightforest:minoshroom",
      "twilightforest:hydra",
      "twilightforest:knight_phantom",
      "twilightforest:ur_ghast",
      "twilightforest:alpha_yeti",
      "twilightforest:snow_queen",
      "witherstormmod:wither_storm",
      "witherstormmod:withered_symbiont",
      "deeperdarker:stalker",
      "darkdoppelganger:dark_doppelganger",
      "eeeabsmobs:nameless_guardian",
      "eeeabsmobs:immortal",
      "legendary_monsters:cloud_golem",
      "mowziesmobs:ferrous_wroughtnaut",
      "mowziesmobs:umvuthi",
      "mowziesmobs:frostmaw",
      "sculkhorde:sculk_enderman"
    )
        .pool((pool) => {
            pool.rolls(1); // Ensure exactly one roll
            pool.addAlternativesLoot(
                LootEntry.of("kubejs:pouch").when((c) => c.randomChance(0.6)), // 63% chance for coal
                LootEntry.of("kubejs:better_pouch").when((c) => c.randomChance(0.3)), // 37% chance for diamond (fallback)
                LootEntry.of("kubejs:great_pouch") // 37% chance for diamond (fallback)
            );
        });
});
