//priority: 100

onEvent("lootjs", (event) => {
    const arrowMobs = [MC("skeleton"), MC("stray"), Q("forgotten")]
	arrowMobs.forEach(mob => {
        event.addEntityLootModifier(mob).thenRemove(MC("arrow"))
    })
    event.addEntityLootModifier(MC("stray")).thenRemove(Item.of(MC("tipped_arrow")).ignoreNBT())
    event.addLootTypeModifier(LootType.ENTITY).thenRemove(MC("arrow"))

    const cobwebMobs = [MC("entities/spider"), MC("entities/cave_spider")]
    cobwebMobs.forEach(mob => {
        event.addLootTableModifier(mob).randomChance(0.1).thenAdd(MC("cobweb"));
    })

    event.addLootTableModifier(MC("entities/elder_guardian")).randomChance(0.1).thenAdd(MC("heart_of_the_sea"));


    //remove flint drop from gravel (manually)
    event.addBlockLootModifier(MC("gravel")).thenReplace(MC("flint"), MC("gravel"))
});