ServerEvents.recipes((event) => {

  // Inputs como Tags
  let Dirt = "exdeorum:compressed/dirt";
  let Gravel = "exdeorum:compressed/gravel";
  let Sand = "exdeorum:compressed/sand";
  let CrushedNetherrack = "exdeorum:compressed/crushed_netherrack";
  let CrushedEndStone = "exdeorum:compressed/crushed_end_stone";
  let CrushedDeepslate = "exdeorum:compressed/crushed_deepslate";
  let Dust = "exdeorum:compressed/dust";

  // Meshes
  let IronMesh = "exdeorum:iron_mesh";
  let GoldMesh = "exdeorum:golden_mesh";
  let DiamondMesh = "exdeorum:diamond_mesh";
  let NetheriteMesh = "exdeorum:netherite_mesh";

  // Função para adicionar receitas de sieve
  let addCompressedSieve = (input, mesh, output, amount, chance) => {
    event.custom({
      type: "exdeorum:compressed_sieve",
      ingredient: {
        tag: input, // Usando tags em vez de itens específicos
      },
      mesh: mesh,
      result: output,
      result_amount: {
        type: "minecraft:binomial",
        n: amount,
        p: chance,
      },
    });
  };

  // Receitas para IronMesh e acima
  addCompressedSieve(Dirt, IronMesh, "farmersdelight:rice", 1, 0.05);
  addCompressedSieve(Dust, IronMesh, "apotheosis:gem_dust", 1, 0.005);
  addCompressedSieve(Dirt, GoldMesh, "farmersdelight:rice", 3, 0.07);
  addCompressedSieve(Dust, GoldMesh, "apotheosis:gem_dust", 1, 0.005);
  addCompressedSieve(Dirt, DiamondMesh, "farmersdelight:rice", 5, 0.09);
  addCompressedSieve(Dust, DiamondMesh, "apotheosis:gem_dust", 1, 0.005);
  addCompressedSieve(Dirt, NetheriteMesh, "farmersdelight:rice", 7, 0.11);
  addCompressedSieve(Dust, NetheriteMesh, "apotheosis:gem_dust", 1, 0.005);

  addCompressedSieve(Gravel, IronMesh, "powah:uraninite_raw", 3, 0.05);
  addCompressedSieve(Gravel, GoldMesh, "powah:uraninite_raw", 5, 0.07);
  addCompressedSieve(Gravel, DiamondMesh, "powah:uraninite_raw", 7, 0.09);
  addCompressedSieve(Gravel, NetheriteMesh, "powah:uraninite_raw", 9, 0.11);

  addCompressedSieve(CrushedNetherrack, IronMesh, "malum:blazing_quartz_fragment", 3, 0.05);
  addCompressedSieve(CrushedNetherrack, GoldMesh, "malum:blazing_quartz_fragment", 5, 0.07);
  addCompressedSieve(CrushedNetherrack, DiamondMesh, "malum:blazing_quartz_fragment", 7, 0.09);
  addCompressedSieve(CrushedNetherrack, NetheriteMesh, "malum:blazing_quartz_fragment", 9, 0.11);

  // Receitas específicas para meshes mais altos
  addCompressedSieve(CrushedEndStone, DiamondMesh, "kubejs:azure_silver_ore_chunk", 7, 0.09);
  addCompressedSieve(CrushedEndStone, NetheriteMesh, "kubejs:azure_silver_ore_chunk", 9, 0.11);

  addCompressedSieve(CrushedNetherrack, DiamondMesh, "kubejs:crimson_ore_chunk", 7, 0.09);
  addCompressedSieve(CrushedNetherrack, NetheriteMesh, "kubejs:crimson_ore_chunk", 9, 0.11);

  addCompressedSieve(CrushedDeepslate, DiamondMesh, "malum:cthonic_gold_fragment", 7, 0.09);
  addCompressedSieve(CrushedDeepslate, NetheriteMesh, "malum:cthonic_gold_fragment", 9, 0.11);

  addCompressedSieve(CrushedDeepslate, DiamondMesh, "evilcraft:dark_gem_crushed", 7, 0.09);
  addCompressedSieve(CrushedDeepslate, NetheriteMesh, "evilcraft:dark_gem_crushed", 9, 0.11);

  addCompressedSieve(CrushedNetherrack, DiamondMesh, "kubejs:iesnium_ore_chunk", 5, 0.09);
  addCompressedSieve(CrushedNetherrack, NetheriteMesh, "kubejs:iesnium_ore_chunk", 7, 0.11);

  addCompressedSieve(Sand, DiamondMesh, "elementalcraft:inert_crystal", 7, 0.09);
  addCompressedSieve(Sand, NetheriteMesh, "elementalcraft:inert_crystal", 9, 0.11);

  addCompressedSieve(CrushedNetherrack, DiamondMesh, "kubejs:infinity_ore_chunk", 1, 0.001);
  addCompressedSieve(CrushedNetherrack, NetheriteMesh, "kubejs:infinity_ore_chunk", 3, 0.3);

  addCompressedSieve(Sand, DiamondMesh,"minecraft:kelp", 5, 0.15 )
});
