// priority: -1

console.info("General Server Script Loaded");

ServerEvents.recipes((event) => {
  // Deprecated conversation
  // Dollars to Cents and Cents to Dollars
  event.shapeless("kubejs:create_dollar", ["4x kubejs:create_cent"]);
  event.shapeless("4x kubejs:create_cent", ["kubejs:create_dollar"]);

  // Fiveries to Dollars and Dollars to Fiveries
  event.shapeless("5x kubejs:create_dollar", ["kubejs:create_fivery"]);
  event.shapeless("kubejs:create_fivery", ["5x kubejs:create_dollar"]);

  // Fiveries to Twenticies and Twenticies to Fiveries
  event.shapeless("4x kubejs:create_fivery", ["kubejs:create_twenticy"]);
  event.shapeless("kubejs:create_twenticy", ["4x kubejs:create_fivery"]);

  event.shapeless("kubejs:creatio", ["kubejs:create_dollar"]);
  event.shapeless("kubejs:creatio_five", ["kubejs:create_fivery"]);
  event.shapeless("kubejs:creatio_deca_two", ["kubejs:create_twenticy"]);
  event.shapeless("kubejs:creatio", ["5x kubejs:create_cent"]);

  // Coin die recipe
  event.recipes.thermal.press("kubejs:creatio_five", [
    "#forge:ingots/netherite",
    "thermal:press_coin_die",
  ]);
  // Unpacking
  event.recipes.thermal.press("diamond", [
    "kubejs:creatio",
    "thermal:press_unpacking_die",
  ]);

  // Stonecutter recipes
  // 20C Downsizing
  event.stonecutting("2x kubejs:creatio_deca", "kubejs:creatio_deca_two");
  event.stonecutting("4x kubejs:creatio_five", "kubejs:creatio_deca_two");
  event.stonecutting("10x kubejs:creatio_two", "kubejs:creatio_deca_two");
  event.stonecutting("20x kubejs:creatio", "kubejs:creatio_deca_two");

  // 10C Downsizing
  event.stonecutting("2x kubejs:creatio_five", "kubejs:creatio_deca");
  event.stonecutting("5x kubejs:creatio_two", "kubejs:creatio_deca");
  event.stonecutting("10x kubejs:creatio", "kubejs:creatio_deca");
  event.stonecutting("20x kubejs:creatio_deci_five", "kubejs:creatio_deca");

  // 5C Downsizing
  event.stonecutting("5x kubejs:creatio", "kubejs:creatio_five");
  event.stonecutting("10x kubejs:creatio_deci_five", "kubejs:creatio_five");
  event.stonecutting("25x kubejs:creatio_deci_two", "kubejs:creatio_five");

  // 2C Downsizing
  event.stonecutting("2x kubejs:creatio", "kubejs:creatio_two");
  event.stonecutting("4x kubejs:creatio_deci_five", "kubejs:creatio_two");
  event.stonecutting("10x kubejs:creatio_deci_two", "kubejs:creatio_two");
  event.stonecutting("20x kubejs:creatio_deci", "kubejs:creatio_two");

  // Creatio Downsizing
  event.stonecutting("2x kubejs:creatio_deci_five", "kubejs:creatio");
  event.stonecutting("5x kubejs:creatio_deci_two", "kubejs:creatio");
  event.stonecutting("10x kubejs:creatio_deci", "kubejs:creatio");
  event.stonecutting("20x kubejs:creatio_centi_five", "kubejs:creatio");
  event.stonecutting("50x kubejs:creatio_centi_two", "kubejs:creatio");

  // 0.5 Downsizing
  event.stonecutting("5x kubejs:creatio_deci", "kubejs:creatio_deci_five");
  event.stonecutting(
    "10x kubejs:creatio_centi_five",
    "kubejs:creatio_deci_five",
  );
  event.stonecutting(
    "25x kubejs:creatio_centi_two",
    "kubejs:creatio_deci_five",
  );
  event.stonecutting("50x kubejs:creatio_centi", "kubejs:creatio_deci_five");

  // shapeless
  // 🔼 UPGRADES

  event.shapeless("kubejs:creatio_deca_two", ["2x kubejs:creatio_deca"]);

  event.shapeless("kubejs:creatio_deca", ["5x kubejs:creatio_two"]);

  event.shapeless("kubejs:creatio_five", ["5x kubejs:creatio"]);

  event.shapeless("kubejs:creatio_two", ["2x kubejs:creatio"]);

  event.shapeless("kubejs:creatio", ["2x kubejs:creatio_deci_five"]);

  event.shapeless("kubejs:creatio_deci_five", ["5x kubejs:creatio_deci"]);

  event.shapeless("kubejs:creatio_deci_two", ["5x kubejs:creatio_centi_two"]);

  event.shapeless("kubejs:creatio_deci", ["10x kubejs:creatio_centi"]);

  event.shapeless("kubejs:creatio_centi_five", ["5x kubejs:creatio_centi"]);

  event.shapeless("kubejs:creatio_centi_two", ["2x kubejs:creatio_centi"]);

  // 🔽 DOWNGRADES

  event.shapeless("2x kubejs:creatio_deca", ["kubejs:creatio_deca_two"]);

  event.shapeless("5x kubejs:creatio_two", ["kubejs:creatio_deca"]);

  event.shapeless("5x kubejs:creatio", ["kubejs:creatio_five"]);

  event.shapeless("2x kubejs:creatio", ["kubejs:creatio_two"]);

  event.shapeless("2x kubejs:creatio_deci_five", ["kubejs:creatio"]);

  event.shapeless("5x kubejs:creatio_deci", ["kubejs:creatio_deci_five"]);

  event.shapeless("5x kubejs:creatio_centi_two", ["kubejs:creatio_deci_two"]);

  event.shapeless("10x kubejs:creatio_centi", ["kubejs:creatio_deci"]);

  event.shapeless("5x kubejs:creatio_centi", ["kubejs:creatio_centi_five"]);

  event.shapeless("2x kubejs:creatio_centi", ["kubejs:creatio_centi_two"]);
});
