events.listen("recipes", function (e) {
  function ingredientSeive(lamesh, blocentree, blocsortie, chanceLoot) {
    e.custom({
      type: "exnihilosequentia:sieve",
      rolls: [
        {
          chance: chanceLoot,
          mesh: lamesh,
        },
      ],
      input: {
        item: blocentree,
      },
      result: {
        item: blocsortie,
      },
    });
  }
  function ingredientSeiveTag(lamesh, blocentree, blocsortie, chanceLoot) {
    e.custom({
      type: "exnihilosequentia:sieve",
      rolls: [
        {
          chance: chanceLoot,
          mesh: lamesh,
        },
      ],
      input: {
        tag: blocentree,
      },
      result: {
        item: blocsortie,
      },
    });
  }

  //rajout pour sieve  (mesh depart, item user, objet cree)
  ingredientSeive("flint", "exnihilosequentia:dust", "thermal:ruby", 0.125);
  ingredientSeive("flint", "exnihilosequentia:dust", "thermal:sapphire", 0.125);
  ingredientSeive("flint", "exnihilosequentia:dust", "thermal:niter", 0.125);

  ingredientSeive("flint", "minecraft:gravel", "thermal:apatite", 0.125);
  ingredientSeive("flint", "minecraft:sand", "mekanism:block_salt", 0.125);

  ingredientSeive(
    "flint",
    "minecraft:dirt",
    "mysticalagriculture:prosperity_shard",
    0.125
  );

  ingredientSeive("emerald", "minecraft:dirt", "minecraft:chorus_flower", 0.02);

  ingredientSeive("emerald", "exnihilosequentia:dust", "minecraft:egg", 0.35);
  ingredientSeive(
    "emerald",
    "exnihilosequentia:dust",
    "appliedenergistics2:sky_dust",
    0.1
  );
  ingredientSeiveTag(
    "emerald",
    "minecraft:leaves",
    "integrateddynamics:menril_sapling",
    0.1
  );
  /*
  ingredientSeive(
    "emerald",
    "exnihiloae:crushed_skystone",
    "appliedenergistics2:certus_quartz_crystal",
    0.1
  );
  

  ingredientSeive(
    "emerald",
    "exnihiloae:crushed_skystone",
    "appliedenergistics2:charged_certus_quartz_crystal",
    0.01
  );*/
  ingredientSeive("diamond", "minecraft:sand", "astralsorcery:aquamarine", 0.2);
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:ocelot_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:wolf_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:cow_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:pig_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "kubejs:limestone_bait",
    0.05
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:chicken_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:sheep_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:squid_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:rabbit_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:horse_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:donkey_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:polar_bear_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:llama_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:parrot_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:cat_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:fox_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:turtle_bait",
    0.1
  );
  ingredientSeive(
    "netherite",
    "kubejs:chicken_bait_gravel",
    "excompressum:mooshroom_bait",
    0.1
  );

  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_zinc",
    0.6
  );

  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_aluminum",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_silver",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_nickel",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_copper",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_uranium",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_lead",
    0.6
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "exnihilosequentia:piece_iron",
    0.6
  );

  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:emerald",
    0.2
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:diamond",
    0.2
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:redstone",
    0.35
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:blaze_powder",
    0.1
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:lapis_lazuli",
    0.2
  );
  ingredientSeive(
    "netherite",
    "exnihilosequentia:crushed_netherrack",
    "minecraft:coal",
    0.2
  );
});
