ServerEvents.recipes((event) => {
  // =========================================
  // Beekeeper Armor Recipes
  // =========================================

  // Beekeeper helmet
  event
    .shaped("thermal:beekeeper_helmet", [
        "AAA",
        "ABA"
    ], 
    {
      A: "thermal:beekeeper_fabric",
      B: "minecraft:chainmail_helmet",
    })
    .id("thermal:armor/beekeeper_helmet");

  // Beekeeper chestplate
  event
    .shaped("thermal:beekeeper_chestplate", [
        "A A", 
        "ABA", 
        "AAA"
    ], 
    {
      A: "thermal:beekeeper_fabric",
      B: "minecraft:chainmail_chestplate",
    })
    .id("thermal:armor/beekeeper_chestplate");

  // Beekeeper leggings
  event
    .shaped("thermal:beekeeper_leggings", [
        "AAA", 
        "ABA", 
        "A A"
    ], 
    {
      A: "thermal:beekeeper_fabric",
      B: "minecraft:chainmail_leggings",
    })
    .id("thermal:armor/beekeeper_leggings");

  // Beekeeper boots
  event
    .shaped("thermal:beekeeper_boots", [
        "ABA", 
        "A A"
    ], 
    {
      A: "thermal:beekeeper_fabric",
      B: "minecraft:chainmail_boots",
    })
    .id("thermal:armor/beekeeper_boots");

  // Beekeeper fabric
  event.recipes.create
    .filling("thermal:beekeeper_fabric", [
      Fluid.of("create:honey", 250),
      "farmersdelight:canvas",
    ])
    .id("thermal:beekeeper_fabric");

  // =========================================
  // Hazmat Armor Recipes
  // =========================================

  // Hazmat helmet
  event
    .shaped("thermal:hazmat_helmet", [
        "ABA", 
        "BCB"
    ], 
    {
      A: "thermal:hazmat_fabric",
      B: "#forge:ingots/lead",
      C: "#forge:glass_panes/colorless",
    })
    .id("thermal:armor/hazmat_helmet");

  // Hazmat chestplate
  event
    .shaped("thermal:hazmat_chestplate", [
        "A A", 
        "BAB", 
        "AAA"
    ], 
    {
      A: "thermal:hazmat_fabric",
      B: "#forge:ingots/lead",
    })
    .id("thermal:armor/hazmat_chestplate");

  // Hazmat leggings
  event
    .shaped("thermal:hazmat_leggings", [
        "AAA", 
        "BAB", 
        "A A"
    ], 
    {
      A: "thermal:hazmat_fabric",
      B: "#forge:ingots/lead",
    })
    .id("thermal:armor/hazmat_leggings");

  // Hazmat boots
  event
    .shaped("thermal:hazmat_boots", [
        "A A", 
        "BCB"
    ], 
    {
      A: "thermal:hazmat_fabric",
      B: "#forge:leather",
      C: ["create_dd:rubber", "thermal:cured_rubber"],
    })
    .id("thermal:armor/hazmat_boots");

  // Hazmat fabric
  event.recipes.create
    .filling("thermal:hazmat_fabric", [
      Fluid.of("undergarden:virulent_mix_source", 250),
      "farmersdelight:canvas",
    ])
    .id("thermal:hazmat_fabric");

  // =========================================
  // Thermal Machines
  // =========================================

  // Hive Hopper
  event
    .shaped("thermal:device_hive_extractor", [
        "ABA", 
        "CDE", 
        "AFA"
    ], 
    {
      A: "the_bumblezone:beehive_beeswax",
      B: "thermal:bronze_gear",
      C: "sophisticatedstorage:smoking_upgrade",
      D: "minecraft:shears",
      E: "sophisticatedstorage:hopper_upgrade",
      F: "thermal:redstone_servo",
    })
    .id("thermal:device_hive_extractor");

  // Aquatic Entangler
  event
    .shaped("thermal:device_fisher", [
        "ABA", 
        "CDE", 
        "AFA"
    ], 
    {
      A: /crabbersdelight:.*barrel/,
      B: "thermal:copper_gear",
      C: "sophisticatedstorage:pickup_upgrade",
      D: "crabbersdelight:crab_trap",
      E: "sophisticatedstorage:hopper_upgrade",
      F: "thermal:redstone_servo",
    })
    .id("thermal:device_fisher");

  // Marine fabric
  event.recipes.create
    .filling("thermal:diving_fabric", [
      Fluid.of("thermal:latex", 250),
      "farmersdelight:canvas",
    ])
    .id("thermal:diving_fabric");

  // Junk Net
  event
    .shaped("thermal:junk_net", [
        "ABA", 
        "BCB", 
        "ABA"
    ], 
    {
      A: "#forge:nuggets/lead",
      B: "thermal:diving_fabric",
      C: "#forge:rope",
    })
    .id("thermal:junk_net");

  // Tinker's Workbench
  event.replaceInput(
    { id: "thermal:tinker_bench" },
    "thermal:rf_coil",
    "supplementaries:wrench"
  );

  // Energetic Infuser
  event.replaceInput(
    { id: "thermal:charge_bench" },
    "#forge:storage_blocks/redstone",
    "thermal:energy_cell"
  );

  // =========================================
  // Thermal Components
  // =========================================

  // RF Coil
  event
    .shaped("thermal:rf_coil", [
        "  A", 
        " B ", 
        "C  "
    ], 
    {
      A: "alexscaves:azure_neodymium_ingot",
      B: "createaddition:gold_spool",
      C: "alexscaves:scarlet_neodymium_ingot",
    })
    .id("thermal:rf_coil");

  // Machine Frame
  event.recipes.create
    .mechanical_crafting("thermal:machine_frame", [
        "AABAA", 
        "ACDCA", 
        "BEFEB", 
        "GCECG", 
        "GGBGG"
    ],
    {
        A: "#forge:plates/tin",
        B: "create:framed_glass",
        C: "createaddition:copper_spool",
        D: "createaddition:large_connector",
        E: "createaddition:connector",
        F: "alexscaves:heart_of_iron",
        G: "#forge:plates/lapis_alloy",
    })
    .id("thermal:machine_frame");

  // =========================================
  // Thermal Dynamos
  // =========================================

  // Stirling Dynamo
  event
    .shaped("thermal:dynamo_stirling", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "minecraft:furnace",
      F: "alexscaves:tesla_bulb",
      G: "create:blaze_burner",
    })
    .id("thermal:dynamo_stirling");

  // Compression Dynamo
  event
    .shaped("thermal:dynamo_compression", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "create_sa:small_filling_tank",
      F: "alexscaves:tesla_bulb",
      G: "create:blaze_burner",
    })
    .id("thermal:dynamo_compression");

  // Magmatic Dynamo
  event
    .shaped("thermal:dynamo_magmatic", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "create_sa:small_fueling_tank",
      F: "alexscaves:tesla_bulb",
      G: "create:blaze_burner",
    })
    .id("thermal:dynamo_magmatic");

  // Numismatic Dynamo
  event
    .shaped("thermal:dynamo_numismatic", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "rats:tiny_coin",
      F: "alexscaves:tesla_bulb",
      G: "monobank:monobank",
    })
    .id("thermal:dynamo_numismatic");

  // Lapidary Dynamo
  event
    .shaped("thermal:dynamo_lapidary", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "exchangers:emerald_exchanger",
      F: "alexscaves:tesla_bulb",
      G: "easy_villagers:villager",
    })
    .id("thermal:dynamo_lapidary");

  // Disenchantment Dynamo
  event
    .shaped("thermal:dynamo_disenchantment", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: "nocubescreateexp:exp_block",
      F: "alexscaves:tesla_bulb",
      G: "thermal:xp_crystal",
    })
    .id("thermal:dynamo_disenchantment");

  // Gourmand Dynamo
  event
    .shaped("thermal:dynamo_gourmand", [
        " A ", 
        "BCD", 
        "EFG"
    ], 
    {
      A: "thermal:rf_coil",
      B: "alexscaves:scarlet_magnet",
      C: "createdieselgenerators:engine_piston",
      D: "alexscaves:azure_magnet",
      E: [
        /qualitysdelight:.*block_diamond/,
        "qualitysdelight:guardian_soup_diamond",
      ],
      F: "alexscaves:tesla_bulb",
      G: "farmersdelight:cooking_pot",
    })
    .id("thermal:dynamo_gourmand");

  // Auxiliary Reaction Chamber
  event.replaceInput(
    { id: "thermal:augments/dynamo_output_augment" },
    "#forge:plates/signalum",
    "#forge:plates/desh"
  );

  // =========================================
  // Thermal Storage
  // =========================================

  // Energy Cell
  event.recipes.create
    .mechanical_crafting(
      "thermal:energy_cell", [
        "AABAA", 
        "ACDCA", 
        "BEFEB", 
        "ACECA", 
        "AABAA"
    ],
    {
        A: "create_dd:overburden_casing",
        B: "create:framed_glass",
        C: "thermal:energy_duct",
        D: "#forge:gears/electrum",
        E: "#forge:storage_blocks/redstone",
        F: "create_dd:integrated_mechanism",
    })
    .id("thermal:energy_cell");

  // Fluid Cell
  event.recipes.create
    .mechanical_crafting("thermal:fluid_cell", [
        "AABAA", 
        "ACDCA", 
        "BEFEB", 
        "ACECA", 
        "AABAA"
    ],
    {
        A: "create_dd:hydraulic_casing",
        B: "create:framed_glass",
        C: "thermal:fluid_duct",
        D: "#forge:gears/bronze",
        E: "create:fluid_tank",
        F: "create_dd:sealed_mechanism",
    })
    .id("thermal:fluid_cell");

  // =========================================
  // Misc Thermal Stuff
  // =========================================

  // Flux Duct
  event
    .shaped("4x thermal:energy_duct", [
        "AAA", 
        "BCB", 
        "AAA"
    ], 
    {
      A: "#forge:dusts/redstone",
      B: "#forge:ingots/lead",
      C: "create_new_age:copper_wire",
    })
    .id("thermal:energy_duct_4");

  // Fluid Duct
  event
    .shaped("4x thermal:fluid_duct", [
        "ABA"
    ], 
    {
      A: "#forge:plates/bronze",
      B: "create:fluid_pipe",
    })
    .id("thermal:fluid_duct_4");

  // Fluid Duct
  event
    .shaped("thermal:fluid_duct_windowed", [
        "AB"
    ], 
    {
      A: "thermal:fluid_duct",
      B: "#forge:glass/colorless",
    })
    .id("thermal:fluid_duct_windowed_4");

  // Flux Magnet
  event
    .shaped("thermal:flux_magnet", [
        "A B", 
        "CDC", 
        "CEC"
    ], 
    {
      A: "alexscaves:scarlet_magnet",
      B: "alexscaves:azure_magnet",
      C: "#forge:ingots/lead",
      D: "create_sa:copper_magnet",
      E: "thermal:rf_coil",
    })
    .id("thermal:flux_magnet");

  // Thermal Sulfur Dust - Create Crushing Wheel recipe
  event.recipes.create.crushing("thermal:sulfur_dust", "thermal:sulfur");

  // Gem Blocks -> Gems
  event.shapeless("9x thermal:ruby", ["thermal:ruby_block"]);
  event.shapeless("9x thermal:sapphire", ["thermal:sapphire_block"]);
  event
    .shaped("thermal:ruby_block", [
        "AAA", 
        "AAA", 
        "AAA"
    ], 
    {
        A: "thermal:ruby",
    })
    .id("thermal:ruby_block");
  event
    .shaped("thermal:sapphire_block", [
        "AAA", 
        "AAA", 
        "AAA"
    ], 
    {
        A: "thermal:sapphire",
    })
    .id("thermal:sapphire_block");


    event.replaceInput(
      { mod: "thermal" },
      "thermal:cured_rubber",
      ["create_dd:rubber", "thermal:cured_rubber"]
    );
});