ServerEvents.recipes((event) => {

  // =========================================
  // Create Mechanical Extruder
  // =========================================

  // Mechanical Extruder
  event
  .shaped("create_mechanical_extruder:mechanical_extruder", [
    "ABA", 
    "CDC", 
    "ACA"
  ], 
  {
    A: "create_dd:andesite_sheet",
    B: "create_dd:hydraulic_press",
    C: "minecraft:observer",
    D: "rats:ancient_sawblade"
  })
  .id("create_mechanical_extruder:crafting/mechanical_extruder");


  // Ancient Gold

    event.custom({
        type: "create_mechanical_extruder:extruding",
        requiredBonks: 1,
        catalyst: {
          item: "minecraft:gold_block"
        },
        ingredients: [
          {
            item: "call_of_yucutan:kukulkan_idol"
          },
          {
            item: "call_of_yucutan:ancient_gold"
          }
        ],
        result: {
          item: "call_of_yucutan:ancient_gold_ingot",
          chance: 0.1
        }
      })

  // Hematite

    event.custom({
        type: "create_mechanical_extruder:extruding",
        requiredBonks: 1,
        catalyst: {
          item: "minecraft:iron_block"
        },
        ingredients: [
          {
            item: "call_of_yucutan:ah_puch_idol"
          },
          {
            item: "call_of_yucutan:hematite_block"
          }
        ],
        result: {
          item: "call_of_yucutan:hematite",
          chance: 0.1
        }
      })



    // Rock Candy Blocks

    global.colors.forEach((color) => {
      
    event.custom({
        type: "create_mechanical_extruder:extruding",
        ingredients: [
          {
            item: `alexscaves:rock_candy_white`
          },
          {
            item: `arts_and_crafts:${color}_chalk`
          }
        ],
        result: {
          item: `alexscaves:rock_candy_${color}`
        }
      })  

      event.custom({
        type: "thermal:rock_gen",
        adjacent: `arts_and_crafts:${color}_chalk`,
        below: `alexscaves:rock_candy_white`,
        result: {
          item: `alexscaves:rock_candy_${color}`
        }
      })  

    });

    // Arts & Crafts Soapstone

    global.colors.forEach((color) => {
      
    event.custom({
        type: "create_mechanical_extruder:extruding",
        ingredients: [
          {
            item: `supplementaries:soap_block`
          },
          {
            item: `arts_and_crafts:${color}_chalk`
          }
        ],
        result: {
          item: `arts_and_crafts:${color}_soapstone`
        }
      })  

      event.custom({
        type: "thermal:rock_gen",
        adjacent: `arts_and_crafts:${color}_chalk`,
        below: `supplementaries:soap_block`,
        result: {
          item: `arts_and_crafts:${color}_soapstone`
        }
      })  

    });



    let extruderIngredients = [
  ["alexscaves:gingerbread_bricks", "alexscaves:block_of_vanilla_frosting", "alexscaves:frosted_gingerbread_bricks"],
  ["alexscaves:gingerbread_block", "arts_and_crafts:orange_mud_bricks", "alexscaves:gingerbread_bricks"],
  ["alexscaves:dough_block", "alexscaves:block_of_polished_chocolate", "alexscaves:cookie_block"],
  ["alexscaves:dough_block", "alexscaves:cookie_block", "alexscaves:wafer_cookie_block"],
  ["minecraft:cake", "minecraft:cake", "alexscaves:cake_layer"],
  ["alexscaves:block_of_chocolate", "minecraft:magma_block", "alexscaves:block_of_polished_chocolate"],
  ["alexscaves:guanostone", "alexscaves:guano_block", "alexscaves:coprolith"],
  ["alexscaves:abyssmarine", "minecraft:prismarine_bricks", "alexscaves:abyssmarine_bricks"],
  ["alexscaves:unrefined_waste", "alexscaves:sulfur", "alexscaves:hazmat_block"],
  ["minecraft:deepslate", "alexscaves:radrock_uranium_ore", "alexscaves:radrock"],
  ["minecraft:light_gray_concrete", "arts_and_crafts:light_gray_mud_bricks", "alexscaves:cinder_block"],
  ["alexscaves:metal_swarf", "alexscaves:scarlet_neodymium_node", "alexscaves:metal_swarf"],
  ["alexscaves:galena", "alexscaves:azure_neodymium_node", "alexscaves:galena"],
  ["alexscaves:amber", "alexscaves:limestone_chiseled", "alexscaves:limestone"],
  ["ad_astra:earth_globe", "ad_astra:iron_factory_block", "ad_astra:iron_factory_block"],
  ["ad_astra:earth_globe", "ad_astra:encased_iron_block", "ad_astra:encased_iron_block"],
  ["ad_astra:earth_globe", "ad_astra:iron_plateblock", "ad_astra:iron_plateblock"],
  ["ad_astra:earth_globe", "ad_astra:iron_panel", "ad_astra:iron_panel"],
  ["ad_astra:earth_globe", "ad_astra:iron_plating", "ad_astra:iron_plating"],
  ["ad_astra:earth_globe", "ad_astra:glowing_iron_pillar", "ad_astra:glowing_iron_pillar"],
  ["ad_astra:earth_globe", "ad_astra:marked_iron_pillar", "ad_astra:marked_iron_pillar"],
  ["ad_astra:earth_globe", "ad_astra:steel_factory_block", "ad_astra:steel_factory_block"],
  ["ad_astra:earth_globe", "ad_astra:encased_steel_block", "ad_astra:encased_steel_block"],
  ["ad_astra:earth_globe", "ad_astra:steel_plateblock", "ad_astra:steel_plateblock"],
  ["ad_astra:earth_globe", "ad_astra:steel_panel", "ad_astra:steel_panel"],
  ["ad_astra:earth_globe", "ad_astra:steel_plating", "ad_astra:steel_plating"],
  ["ad_astra:earth_globe", "ad_astra:glowing_steel_pillar", "ad_astra:glowing_steel_pillar"],
  ["ad_astra:moon_globe", "ad_astra:desh_factory_block", "ad_astra:desh_factory_block"],
  ["ad_astra:moon_globe", "ad_astra:encased_desh_block", "ad_astra:encased_desh_block"],
  ["ad_astra:moon_globe", "ad_astra:desh_plateblock", "ad_astra:desh_plateblock"],
  ["ad_astra:moon_globe", "ad_astra:desh_panel", "ad_astra:desh_panel"],
  ["ad_astra:moon_globe", "ad_astra:glowing_desh_pillar", "ad_astra:glowing_desh_pillar"],
  ["ad_astra:moon_globe", "ad_astra:moon_stone", "ad_astra:moon_stone"],
  ["ad_astra:glacio_globe", "ad_astra:glacio_stone", "ad_astra:glacio_stone"],
  ["ad_astra:glacio_globe", "ad_astra:permafrost", "ad_astra:permafrost"],
  ["ad_astra:mercury_globe", "ad_astra:mercury_stone", "ad_astra:mercury_stone"],
  ["ad_astra:mars_globe", "ad_astra:ostrum_factory_block", "ad_astra:ostrum_factory_block"],
  ["ad_astra:mars_globe", "ad_astra:encased_ostrum_block", "ad_astra:encased_ostrum_block"],
  ["ad_astra:mars_globe", "ad_astra:ostrum_plateblock", "ad_astra:ostrum_plateblock"],
  ["ad_astra:mars_globe", "ad_astra:ostrum_panel", "ad_astra:ostrum_panel"],
  ["ad_astra:mars_globe", "ad_astra:ostrum_plating", "ad_astra:ostrum_plating"],
  ["ad_astra:mars_globe", "ad_astra:glowing_ostrum_pillar", "ad_astra:glowing_ostrum_pillar"],
  ["ad_astra:mars_globe", "ad_astra:mars_stone", "ad_astra:mars_stone"],
  ["ad_astra:venus_globe", "ad_astra:calorite_factory_block", "ad_astra:calorite_factory_block"],
  ["ad_astra:venus_globe", "ad_astra:encased_calorite_block", "ad_astra:encased_calorite_block"],
  ["ad_astra:venus_globe", "ad_astra:calorite_plateblock", "ad_astra:calorite_plateblock"],
  ["ad_astra:venus_globe", "ad_astra:calorite_panel", "ad_astra:calorite_panel"],
  ["ad_astra:venus_globe", "ad_astra:calorite_plating", "ad_astra:calorite_plating"],
  ["ad_astra:venus_globe", "ad_astra:glowing_calorite_pillar", "ad_astra:glowing_calorite_pillar"],
  ["ad_astra:venus_globe", "ad_astra:venus_sandstone", "ad_astra:venus_sandstone"],
  ["ad_astra:venus_globe", "ad_astra:venus_stone", "ad_astra:venus_stone"],
  ["ribbits:swamp_lantern","ribbits:red_toadstool","ribbits:red_toadstool"],
  ["ribbits:swamp_lantern","ribbits:brown_toadstool","ribbits:brown_toadstool"],
  ["ribbits:swamp_lantern","ribbits:toadstool_stem","ribbits:toadstool_stem"],
  ["piglin_ruins:ominous_stalk_block","pigsteel:refined_pigsteel","pigsteel:refined_pigsteel"],
  ["piglin_ruins:ominous_stalk_block","pigsteel:waxed_refined_pigsteel","pigsteel:waxed_refined_pigsteel"],
  ["piglin_ruins:ominous_stalk_block","pigsteel:waxed_infected_refined_pigsteel","pigsteel:waxed_infected_refined_pigsteel"],
  ["piglin_ruins:ominous_stalk_block","pigsteel:waxed_corrupted_refined_pigsteel","pigsteel:waxed_corrupted_refined_pigsteel"],
  ["piglin_ruins:ominous_stalk_block","pigsteel:waxed_zombified_refined_pigsteel","pigsteel:waxed_zombified_refined_pigsteel"],
  ["arts_and_crafts:green_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_verdant_pietraforte"],
  ["arts_and_crafts:gray_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_umber_pietraforte"],
  ["arts_and_crafts:red_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_marlot_pietraforte"],
  ["arts_and_crafts:black_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_jet_pietraforte"],
  ["arts_and_crafts:white_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_ivory_pietraforte"],
  ["arts_and_crafts:brown_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_hazel_pietraforte"],
  ["arts_and_crafts:yellow_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_beige_pietraforte"],
  ["arts_and_crafts:orange_chalk","arts_and_crafts:cobbled_ochre_pietraforte","arts_and_crafts:cobbled_ochre_pietraforte"],
  
];

// Create Mechanical Extruder
extruderIngredients.forEach((ingredient) => {
      
    event.custom({
        type: "create_mechanical_extruder:extruding",
        ingredients: [
          {
            item: ingredient[0]
          },
          {
            item: ingredient[1]
          }
        ],
        result: {
          item: ingredient[2]
        }
      })  
    });

// Thermal Igneous Extruder
extruderIngredients.forEach((ingredient) => {
      
    event.custom({
        type: "thermal:rock_gen",
        adjacent: ingredient[0],
        below: ingredient[1],
        result: {
          item: ingredient[2]
        }
      })  
    });


});