ServerEvents.recipes((event) => {
  
  // Fix for Prima Materia gun
    event.recipes.create
    .mechanical_crafting("scguns:prima_materia", [
      "XMM", 
      "LRS", 
      "Q C"
    ], 
    {
      X: "scguns:scorched_blueprint",
      M: "scguns:scorched_ingot",
      L: "scguns:firing_unit",
      R: "scguns:gun_parts",
      S: "scguns:gun_barrel",
      Q: "scguns:gun_grip",
      C: "scguns:gun_magazine"
    })
    .id("scguns:create/mechanical_crafting/prima_materia");
  
  
  // Cloggrum instead of Anthralite
  event.replaceInput(
    {},
    "scguns:anthralite_ingot",
    "undergarden:cloggrum_ingot"
  );

  event.replaceInput(
    {},
    "scguns:anthralite_nugget",
    "undergarden:cloggrum_nugget"
  );

  // Create DD Bronze instead of Treated Brass
  event.replaceInput(
    {},
    "scguns:treated_brass_ingot",
    "create_dd:bronze_ingot"
  );

  // Create DD Industrial Iron instead of Treated Iron
  event.replaceInput(
    {},
    "scguns:treated_iron_ingot",
    "create_dd:industrial_iron_ingot"
  );

  event.replaceInput(
    {},
    "scguns:treated_iron_nugget",
    "create_dd:industrial_iron_nugget"
  );

  // Ancient Brass and Ancient Gold
  event.recipes.create
    .mixing("3x call_of_yucutan:ancient_gold_ingot", [
      "scguns:ancient_brass",
      "call_of_yucutan:ancient_gold_ingot"
    ])
    .heated()
    .id("scguns:create/ancient_brass_brass_from_mixing");

  
  
  // Scorched Guns Sulfur Dust
  event.recipes.create.crushing("scguns:sulfur_dust", "scguns:sulfur_chunk");

  event.recipes.thermal
    .pulverizer("scguns:sulfur_dust", "scguns:sulfur_chunk")
    .energy(4000);

  // =========================================
  // Bullet Pepper bullet recipes
  // =========================================

  let seqBullets = (Output, Input, Deploy1, Deploy2, TransItem) => {
    event.recipes.create
      .sequenced_assembly(Output, Input, [
        event.recipes.create.deploying(TransItem, [TransItem, Deploy1]),
        event.recipes.create.deploying(TransItem, [TransItem, Deploy2]),
        event.recipes.create.pressing(TransItem, TransItem),
      ])
      .transitionalItem(TransItem)
      .loops(1)
      .id(`scguns:create/sequenced_assembly/${Output.slice(7)}`);
  };

  seqBullets(
    "scguns:compact_copper_round",
    "scguns:small_copper_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:stan_bullet_tips",
    "scguns:unfinished_compact_copper_round"
  );

  seqBullets(
    "scguns:standard_copper_round",
    "scguns:medium_copper_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:stan_bullet_tips",
    "scguns:unfinished_standard_copper_round"
  );

    seqBullets(
    "scguns:compact_advanced_round",
    "scguns:small_brass_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:advanced_bullet_tips",
    "scguns:unfinished_compact_advanced_round"
  );

  seqBullets(
    "scguns:advanced_round",
    "scguns:medium_brass_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:advanced_bullet_tips",
    "scguns:unfinished_advanced_round"
  );

  seqBullets(
    "scguns:shulkshot",
    "scguns:shulker_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:advanced_bullet_tips",
    "scguns:unfinished_shulkshot"
  );

  seqBullets(
    "scguns:gibbs_round",
    "scguns:medium_diamond_steel_casing",
    "mynethersdelight:bullet_pepper",
    "#scguns:advanced_bullet_tips",
    "scguns:unfinished_gibbs_round"
  );

// Thermal Mold Press recipes

event.recipes.thermal.press('12x scguns:small_iron_casing', ['#forge:ingots/iron', 'scguns:small_casing_mold'])
event.recipes.thermal.press('12x scguns:small_brass_casing', ['call_of_yucutan:ancient_gold_ingot', 'scguns:small_casing_mold'])
event.recipes.thermal.press('12x scguns:small_copper_casing', ['#forge:ingots/copper', 'scguns:small_casing_mold'])
event.recipes.thermal.press('12x scguns:small_diamond_steel_casing', ['scguns:diamond_steel_ingot', 'scguns:small_casing_mold'])

event.recipes.thermal.press('8x scguns:medium_brass_casing', ['call_of_yucutan:ancient_gold_ingot', 'scguns:medium_casing_mold'])
event.recipes.thermal.press('12x scguns:shulker_casing', ['minecraft:shulker_shell', 'scguns:medium_casing_mold'])
event.recipes.thermal.press('8x scguns:medium_diamond_steel_casing', ['scguns:diamond_steel_ingot', 'scguns:medium_casing_mold'])
event.recipes.thermal.press('8x scguns:empty_cell', ['#forge:ingots/iron', 'scguns:medium_casing_mold'])
event.recipes.thermal.press('8x scguns:medium_copper_casing', ['#forge:ingots/copper', 'scguns:medium_casing_mold'])

event.recipes.thermal.press('5x scguns:large_brass_casing', ['call_of_yucutan:ancient_gold_ingot', 'scguns:large_casing_mold'])
event.recipes.thermal.press('5x scguns:large_iron_casing', ['#forge:ingots/iron', 'scguns:large_casing_mold'])

event.recipes.thermal.press('12x scguns:standard_bullet', ['#scguns:standard_bullet_material', 'scguns:bullet_mold'])
event.recipes.thermal.press('12x scguns:hardened_bullet', ['#scguns:advanced_bullet_material', 'scguns:bullet_mold'])


});