// Custom recipes
ServerEvents.recipes((event) => {
  // Saddle recipe (Based on the 1.21 recipe)
  event.shaped("saddle", [" L ", "LIL"], {
    L: "leather",
    I: "iron_ingot",
  });

  // Horse armor recipes
  event.shaped("diamond_horse_armor", ["D D", "DLD", "DDD"], {
    D: "diamond",
    L: "leather",
  });
  event.shaped("golden_horse_armor", ["G G", "GLG", "GGG"], {
    G: "gold_ingot",
    L: "leather",
  });
  event.shaped("iron_horse_armor", ["I I", "ILI", "III"], {
    I: "iron_ingot",
    L: "leather",
  });

  // Bundle recipe
  event.shaped("bundle", [" S ", " L "], {
    S: "string",
    L: "leather",
  });

  event.shapeless("createdeco:zinc_sheet", [
    "#forge:ingots/zinc",
    "immersiveengineering:hammer",
  ]);

  event.recipes.thermal.press("createdeco:zinc_sheet", "#forge:ingots/zinc");
  event.recipes.thermal.press("create:brass_sheet", "#forge:ingots/brass");

  // Rapid/Forced Oxidization
  var i = 0;
  function rapidoxi(oxicop, unoxicop) {
    event.recipes.create
      .mixing(oxicop, [unoxicop, Fluid.water(100)])
      .id("createville:mixing/rapid_oxidization_" + i);
    i++;
  }

  // Oxidization Datalist
  var oxidized = Ingredient.of("#createville:rapid_oxidized").itemIds;
  var unoxidized = Ingredient.of("#createville:rapid_unoxidized").itemIds;
  for (var i = 0; i < oxidized.length; i++) {
    rapidoxi(oxidized[i], unoxidized[i]);
  }
});

global.IEMetalPress(
  "#forge:ingots/zinc",
  "immersiveengineering:mold_plate",
  "createdeco:zinc_sheet",
);
