ServerEvents.recipes((event) => {
  // =========================================
  // Ad Astra Recipes
  // =========================================

  // Etrionic Blast Furnace
  event
    .shaped("ad_astra:etrionic_blast_furnace", [
        "ABA", 
        "CDC", 
        "AEA"
    ], 
    {
      A: "#forge:plates/steel",
      B: "alexscaves:ambersol",
      C: "#forge:storage_blocks/lead",
      D: "thermal:machine_crucible",
      E: "alexscaves:nuclear_furnace_component",
    })
    .id("ad_astra:etrionic_blast_furnace");

  // Compressor
  event
    .shaped("ad_astra:compressor", [
        "ABA", 
        "CDC", 
        "AEA"
    ], 
    {
      A: "#forge:plates/steel",
      B: "alexscaves:heavyweight",
      C: "alexscaves:depth_charge",
      D: "thermal:machine_press",
      E: "ad_astra:steel_block",
    })
    .id("ad_astra:compressor");

  // NASA Workbench
  event
    .shaped("ad_astra:nasa_workbench", [
        "ABC", 
        "BDB", 
        "EFG"
    ], 
    {
      A: "etcetera:light_bulb",
      B: "create:mechanical_arm",
      C: "thermal:drill_head",
      D: "thermal:tinker_bench",
      E: "alexscaves:fissile_core",
      F: "alexscaves:enigmatic_engine",
      G: "infinitybuttons:big_console_button",
    })
    .id("ad_astra:nasa_workbench");

    // Replacing Pipe glass with rats tubes
  event.replaceInput(
    [{ output: "ad_astra:desh_fluid_pipe" }, { output: "ad_astra:ostrum_fluid_pipe" }],
    "minecraft:glass",
    "#rats:tubes"
  );

  // =========================================
  // Spacesuit Recipes
  // =========================================

  // Regular
  event.replaceInput(
    { id: "ad_astra:space_helmet" },
    "#forge:glass_panes",
    "alexscaves:hazmat_mask"
  );
  event.replaceInput(
    { id: "ad_astra:space_suit" },
    "#minecraft:wool",
    "alexscaves:hazmat_chestplate"
  );
  event.replaceInput(
    { id: "ad_astra:space_suit" },
    "#minecraft:wool",
    "alexscaves:hazmat_chestplate"
  );

  event
    .shaped("ad_astra:space_pants", [
        "ABA", 
        "C C", 
        "A A"
    ], 
    {
      A: "ad_astra:steel_plate",
      B: "alexscaves:hazmat_leggings",
      C: "thermal:white_rockwool",
    })
    .id("ad_astra:space_pants");

  event
    .shaped("ad_astra:space_boots", [
        "A", 
        "B", 
        "A"
    ], 
    {
      A: "ad_astra:steel_plate",
      B: "alexscaves:hazmat_boots",
    })
    .id("ad_astra:space_boots");

  // Netherite Level
  event
    .shaped("ad_astra:netherite_space_helmet", [
        "ABA", 
        "ACA"
    ], 
    {
      A: "ad_astra:ostrum_plate",
      B: "ad_astra:space_helmet",
      C: "#forge:ingots/netherite",
    })
    .id("ad_astra:netherite_space_helmet");

  event
    .shaped("ad_astra:netherite_space_suit", [
        "ACA", 
        "DED", 
        "ABA"
    ], 
    {
      A: "ad_astra:ostrum_plate",
      B: "ad_astra:space_suit",
      C: "#forge:ingots/netherite",
      D: "ad_astra:large_gas_tank",
      E: "ad_astra:oxygen_gear",
    })
    .id("ad_astra:netherite_space_suit");

  event
    .shaped("ad_astra:netherite_space_pants", [
        "ABA", 
        "DCD", 
        "A A"
    ], 
    {
      A: "ad_astra:ostrum_plate",
      B: "ad_astra:space_pants",
      C: "#forge:ingots/netherite",
      D: "ad_astra:desh_plate",
    })
    .id("ad_astra:netherite_space_pants");

  event
    .shaped("ad_astra:netherite_space_boots", [
        " B ", 
        "DCD", 
        "A A"
    ], 
    {
      A: "ad_astra:ostrum_plate",
      B: "ad_astra:space_boots",
      C: "#forge:ingots/netherite",
      D: "ad_astra:desh_plate",
    })
    .id("ad_astra:netherite_space_boots");

  // Astral Steel only for Ad Astra Stuff
  event
    .custom({
      type: "ad_astra:alloying",
      cookingtime: 100,
      energy: 20,
      ingredients: [
        {
          item: "thermal:steel_ingot",
        },
        {
          item: "alexscaves:polymer_plate",
        },
      ],
      result: {
        count: 1,
        id: "ad_astra:steel_ingot",
      },
    })
    .id("ad_astra:alloying/steel_ingot_from_alloying_iron_ingot_and_coals");

  event.replaceInput(
    { mod: "ad_astra" },
    "#ad_astra:steel_ingots",
    "ad_astra:steel_ingot"
  );
  event.replaceInput(
    { mod: "ad_astra" },
    "#ad_astra:steel_nuggets",
    "ad_astra:steel_nugget"
  );
  event.replaceInput(
    { mod: "ad_astra" },
    "#ad_astra:steel_blocks",
    "ad_astra:steel_block"
  );
  event.replaceInput(
    { mod: "ad_astra" },
    "#ad_astra:steel_plates",
    "ad_astra:steel_plate"
  );

  // Ad Astra Fuel (Nuclear Furnace)
  event.custom({
    type: "alexscaves:nuclear_furnace",
    ingredient: {
      item: "createdieselgenerators:gasoline_bucket",
    },
    result: "ad_astra:fuel_bucket",
    experience: 0.7,
    cookingtime: 100,
  });
});
