onEvent("entity.loot_tables", (event) => {
  ["mineminenomi:pirate_with_sword", "mineminenomi:pirate_brute"].map((x) =>
    event.addEntity(x, (table) => {
      table.addPool(pool => {
        pool.rolls = 5;
        pool.addItem("mineminenomi:pirate_shirt", 1);
        pool.addItem("mineminenomi:pirate_pants", 1);
        pool.addItem("mineminenomi:pirate_boots", 1);
      });
    })
  );
});
