ServerEvents.recipes((event) => {
  event.recipes.create.pressing("kubejs:caster_base", "minecraft:clay_ball");
  event.stonecutting("kubejs:shovel_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:spearhead_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:sickle_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:sword_blade_basic_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:sword_blade_machete_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:sword_blade_heavy_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:hoe_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:claw_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:pickaxe_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:adze_caster", "kubejs:caster_base");
  event.stonecutting("kubejs:axe_caster", "kubejs:caster_base");
  event.stonecutting(
    "kubejs:sword_blade_throwing_knife_caster",
    "kubejs:caster_base"
  );
  event.stonecutting("kubejs:sword_blade_short_caster", "kubejs:caster_base");

  let consume_map = {
    adze_caster: 1,
    axe_caster: 1,
    pickaxe_caster: 1,
    claw_caster: 1,
    hoe_caster: 1,
    sickle_caster: 1,
    shovel_caster: 1,
    spearhead_caster: 1,
    sword_blade_basic_caster: 2,
    sword_blade_heavy_caster: 3,
    sword_blade_machete_caster: 1,
    sword_blade_short_caster: 1,
    sword_blade_throwing_knife_caster: 1,
  };
  let material_result_map = {
    copper: {
      adze_caster: "copper_double_adze",
      axe_caster: "copper_double_basic_axe",
      pickaxe_caster: "copper_double_basic_pickaxe",
      claw_caster: "copper_double_claw",
      hoe_caster: "copper_double_hoe",
      sickle_caster: "copper_double_sickle",
      shovel_caster: "copper_single_basic_shovel",
      spearhead_caster: "copper_single_spearhead",
      sword_blade_basic_caster: "copper_sword_basic_blade",
      sword_blade_heavy_caster: "copper_sword_heavy_blade",
      sword_blade_machete_caster: "copper_sword_machete",
      sword_blade_short_caster: "copper_sword_short_blade",
      sword_blade_throwing_knife_caster: "copper_sword_throwing_knife",
    },
    create_brass: {
      adze_caster: "create_brass_double_adze",
      axe_caster: "create_brass_double_basic_axe",
      pickaxe_caster: "create_brass_double_basic_pickaxe",
      claw_caster: "create_brass_double_claw",
      hoe_caster: "create_brass_double_hoe",
      sickle_caster: "create_brass_double_sickle",
      shovel_caster: "create_brass_single_basic_shovel",
      spearhead_caster: "create_brass_single_spearhead",
      sword_blade_basic_caster: "create_brass_sword_basic_blade",
      sword_blade_heavy_caster: "create_brass_sword_heavy_blade",
      sword_blade_machete_caster: "create_brass_sword_machete",
      sword_blade_short_caster: "create_brass_sword_short_blade",
      sword_blade_throwing_knife_caster: "create_brass_sword_throwing_knife",
    },
    create_zinc: {
      adze_caster: "create_zinc_double_adze",
      axe_caster: "create_zinc_double_basic_axe",
      pickaxe_caster: "create_zinc_double_basic_pickaxe",
      claw_caster: "create_zinc_double_claw",
      hoe_caster: "create_zinc_double_hoe",
      sickle_caster: "create_zinc_double_sickle",
      shovel_caster: "create_zinc_single_basic_shovel",
      spearhead_caster: "create_zinc_single_spearhead",
      sword_blade_basic_caster: "create_zinc_sword_basic_blade",
      sword_blade_heavy_caster: "create_zinc_sword_heavy_blade",
      sword_blade_machete_caster: "create_zinc_sword_machete",
      sword_blade_short_caster: "create_zinc_sword_short_blade",
      sword_blade_throwing_knife_caster: "create_zinc_sword_throwing_knife",
    },
    iron: {
      adze_caster: "iron_double_adze",
      axe_caster: "iron_double_basic_axe",
      pickaxe_caster: "iron_double_basic_pickaxe",
      claw_caster: "iron_double_claw",
      hoe_caster: "iron_double_hoe",
      sickle_caster: "iron_double_sickle",
      shovel_caster: "iron_single_basic_shovel",
      spearhead_caster: "iron_single_spearhead",
      sword_blade_basic_caster: "iron_sword_basic_blade",
      sword_blade_heavy_caster: "iron_sword_heavy_blade",
      sword_blade_machete_caster: "iron_sword_machete",
      sword_blade_short_caster: "iron_sword_short_blade",
      sword_blade_throwing_knife_caster: "iron_sword_throwing_knife",
    },
    steel: {
      adze_caster: "steel_double_adze",
      axe_caster: "steel_double_basic_axe",
      pickaxe_caster: "steel_double_basic_pickaxe",
      claw_caster: "steel_double_claw",
      hoe_caster: "steel_double_hoe",
      sickle_caster: "steel_double_sickle",
      shovel_caster: "steel_single_basic_shovel",
      spearhead_caster: "steel_single_spearhead",
      sword_blade_basic_caster: "steel_sword_basic_blade",
      sword_blade_heavy_caster: "steel_sword_heavy_blade",
      sword_blade_machete_caster: "steel_sword_machete",
      sword_blade_short_caster: "steel_sword_short_blade",
      sword_blade_throwing_knife_caster: "steel_sword_throwing_knife",
    },
    amethyst: {
      adze_caster: "amethyst_double_adze",
      axe_caster: "amethyst_double_basic_axe",
      pickaxe_caster: "amethyst_double_basic_pickaxe",
      claw_caster: "amethyst_double_claw",
      hoe_caster: "amethyst_double_hoe",
      sickle_caster: "amethyst_double_sickle",
      shovel_caster: "amethyst_single_basic_shovel",
      spearhead_caster: "amethyst_single_spearhead",
      sword_blade_basic_caster: "amethyst_sword_basic_blade",
      sword_blade_machete_caster: "amethyst_sword_machete",
      sword_blade_short_caster: "amethyst_sword_short_blade",
      sword_blade_throwing_knife_caster: "amethyst_sword_throwing_knife",
    },
    diamond: {
      adze_caster: "diamond_double_adze",
      axe_caster: "diamond_double_basic_axe",
      pickaxe_caster: "diamond_double_basic_pickaxe",
      claw_caster: "diamond_double_claw",
      hoe_caster: "diamond_double_hoe",
      sickle_caster: "diamond_double_sickle",
      shovel_caster: "diamond_single_basic_shovel",
      spearhead_caster: "diamond_single_spearhead",
      sword_blade_basic_caster: "diamond_sword_basic_blade",
      sword_blade_machete_caster: "diamond_sword_machete",
      sword_blade_short_caster: "diamond_sword_short_blade",
      sword_blade_throwing_knife_caster: "diamond_sword_throwing_knife",
    },
    electrum: {
      adze_caster: "electrum_double_adze",
      axe_caster: "electrum_double_basic_axe",
      pickaxe_caster: "electrum_double_basic_pickaxe",
      claw_caster: "electrum_double_claw",
      hoe_caster: "electrum_double_hoe",
      sickle_caster: "electrum_double_sickle",
      shovel_caster: "electrum_single_basic_shovel",
      spearhead_caster: "electrum_single_spearhead",
      sword_blade_basic_caster: "electrum_sword_basic_blade",
      sword_blade_machete_caster: "electrum_sword_machete",
      sword_blade_short_caster: "electrum_sword_short_blade",
      sword_blade_throwing_knife_caster: "electrum_sword_throwing_knife",
    },
    emerald: {
      adze_caster: "emerald_double_adze",
      axe_caster: "emerald_double_basic_axe",
      pickaxe_caster: "emerald_double_basic_pickaxe",
      claw_caster: "emerald_double_claw",
      hoe_caster: "emerald_double_hoe",
      sickle_caster: "emerald_double_sickle",
      shovel_caster: "emerald_single_basic_shovel",
      spearhead_caster: "emerald_single_spearhead",
      sword_blade_basic_caster: "emerald_sword_basic_blade",
      sword_blade_machete_caster: "emerald_sword_machete",
      sword_blade_short_caster: "emerald_sword_short_blade",
      sword_blade_throwing_knife_caster: "emerald_sword_throwing_knife",
    },
    gold: {
      adze_caster: "gold_double_adze",
      axe_caster: "gold_double_basic_axe",
      pickaxe_caster: "gold_double_basic_pickaxe",
      claw_caster: "gold_double_claw",
      hoe_caster: "gold_double_hoe",
      sickle_caster: "gold_double_sickle",
      shovel_caster: "gold_single_basic_shovel",
      spearhead_caster: "gold_single_spearhead",
      sword_blade_basic_caster: "gold_sword_basic_blade",
      sword_blade_machete_caster: "gold_sword_machete",
      sword_blade_short_caster: "gold_sword_short_blade",
      sword_blade_throwing_knife_caster: "gold_sword_throwing_knife",
    },
    netherite: {
      adze_caster: "netherite_double_adze",
      axe_caster: "netherite_double_basic_axe",
      pickaxe_caster: "netherite_double_basic_pickaxe",
      claw_caster: "netherite_double_claw",
      hoe_caster: "netherite_double_hoe",
      sickle_caster: "netherite_double_sickle",
      shovel_caster: "netherite_single_basic_shovel",
      spearhead_caster: "netherite_single_spearhead",
      sword_blade_basic_caster: "netherite_sword_basic_blade",
      sword_blade_heavy_caster: "netherite_sword_heavy_blade",
      sword_blade_machete_caster: "netherite_sword_machete",
      sword_blade_short_caster: "netherite_sword_short_blade",
      sword_blade_throwing_knife_caster: "netherite_sword_throwing_knife",
    },
    silver: {
      adze_caster: "silver_double_adze",
      axe_caster: "silver_double_basic_axe",
      pickaxe_caster: "silver_double_basic_pickaxe",
      claw_caster: "silver_double_claw",
      hoe_caster: "silver_double_hoe",
      sickle_caster: "silver_double_sickle",
      shovel_caster: "silver_single_basic_shovel",
      spearhead_caster: "silver_single_spearhead",
      sword_blade_basic_caster: "silver_sword_basic_blade",
      sword_blade_machete_caster: "silver_sword_machete",
      sword_blade_short_caster: "silver_sword_short_blade",
      sword_blade_throwing_knife_caster: "silver_sword_throwing_knife",
    },
    cobalt: {
      adze_caster: "cobalt_double_adze",
      axe_caster: "cobalt_double_basic_axe",
      pickaxe_caster: "cobalt_double_basic_pickaxe",
      claw_caster: "cobalt_double_claw",
      hoe_caster: "cobalt_double_hoe",
      sickle_caster: "cobalt_double_sickle",
      shovel_caster: "cobalt_single_basic_shovel",
      spearhead_caster: "cobalt_single_spearhead",
      sword_blade_basic_caster: "cobalt_sword_basic_blade",
      sword_blade_heavy_caster: "cobalt_sword_heavy_blade",
      sword_blade_machete_caster: "cobalt_sword_machete",
      sword_blade_short_caster: "cobalt_sword_short_blade",
      sword_blade_throwing_knife_caster: "cobalt_sword_throwing_knife",
    },
  };

  let ingredient_map = {
    copper: "molten_metals:molten_copper",
    create_brass: "molten_metals:molten_brass",
    create_zinc: "molten_metals:molten_zinc",
    iron: "molten_metals:molten_iron",
    steel: "createbigcannons:molten_steel",
    amethyst: "kubejs:molten_amethyst",
    diamond: "kubejs:molten_diamond",
    electrum: "molten_metals:molten_electrum",
    emerald: "kubejs:molten_emerald",
    gold: "molten_metals:molten_gold",
    netherite: "molten_metals:molten_netherite",
    silver: "molten_metals:molten_silver",
    cobalt: "molten_metals:molten_cobalt"
  };
  for (const [key, value] of Object.entries(material_result_map)) {
    let ingredient = ingredient_map[key];
    for (const [caster, result] of Object.entries(value)) {
      let fluid = Fluid.of(ingredient, consume_map[caster] * 90);
      event.recipes.create.filling("kubejs:" + result, [
        fluid,
        "kubejs:" + caster,
      ]);
    }
  }
});
