ServerEvents.recipes((event) => {
  // =========================================
  // Depth Armor Tools Weapons Smithing
  // =========================================

  let depthSmithing = (depthOutput, depthInput) => {
    event.remove({ id: `${depthOutput}` });
    event.smithing(
      `${depthOutput}`, // arg 1: output
      "seadwellers:depth_upgrade_smithing_template", // arg 2: smithing template
      `${depthInput}`, // arg 3: the item to be upgraded
      "seadwellers:depth_ingot" // arg 4: the upgrade item
    );
  };

  depthSmithing("seadwellers:depth_helmet", "thermal:diving_helmet");
  depthSmithing("seadwellers:depth_helmet", "alexscaves:diving_helmet");
  depthSmithing("seadwellers:depth_chestplate", "thermal:diving_chestplate");
  depthSmithing("seadwellers:depth_chestplate", "alexscaves:diving_chestplate");
  depthSmithing("seadwellers:depth_leggings", "thermal:diving_leggings");
  depthSmithing("seadwellers:depth_leggings", "alexscaves:diving_leggings");
  depthSmithing("seadwellers:depth_boots", "thermal:diving_boots");
  depthSmithing("seadwellers:depth_boots", "alexscaves:diving_boots");
  depthSmithing("seadwellers:depth_pickaxe", "cavesanddepths:rosegoldpickaxe");
  depthSmithing("seadwellers:depth_sword", "cavesanddepths:rosegoldsword");
  depthSmithing("seadwellers:depth_axe", "cavesanddepths:rosegoldaxe");
  depthSmithing("seadwellers:depth_shovel", "cavesanddepths:rosegoldshovel");
  depthSmithing("seadwellers:depth_hoe", "cavesanddepths:rosegoldhoe");

  // Depth Ingot
  event.recipes.thermal
    .smelter("seadwellers:depth_ingot", [
      "#forge:ingots/iron",
      "seadwellers:aquamarine",
      "alexscaves:marine_snow",
    ])
    .energy(1600);
});
