onEvent("entity.check_spawn", (event) => {
    console.setDebugEnabled(true);
    if(event.type == "SPAWNER"){
        event.entity.tags.add("FromSpawner");
    }
})

onEvent("lootjs", (event) => {
  event.addLootTypeModifier(LootType.ENTITY)
    .entityPredicate(e => {
      for(let tag of e.getTags()) {
        if(tag == "FromSpawner") {
          return true;
        }
      }
      return false;
    })
    .removeLoot(ItemFilter.ALWAYS_TRUE)
});