ServerEvents.recipes(event=>{

     const tree_ritual = event.recipes.naturesaura.tree_ritual
    /*Ingredients order
            1
         5     6
      3           4
         7     8
            2
    */
     
     tree_ritual("minecraft:dried_ghast",
        ["quark:soul_bead",
        "supplementaries:bellows",
        "ink_sac",
        "ink_sac",
        "minecraft:bone_block",
        "minecraft:bone_block",
        "minecraft:bone_block",
        "minecraft:bone_block"],
        "jungle_sapling").id("minecraft:dried_ghast")

     tree_ritual("ars_nouveau:starbuncle_charm",
        ["ars_nouveau:starbuncle_shards",
        "woodenhopper:wooden_hopper",
        "immersiveengineering:conveyor_basic",
        "immersiveengineering:conveyor_basic",
        "#forge:ingots/gold",
        "#forge:ingots/gold",
        "#forge:ingots/gold",
        "#forge:ingots/gold"],
        "ars_nouveau:green_archwood_sapling")
   
   
     tree_ritual("ars_nouveau:whirlisprig_charm",
        ["ars_nouveau:whirlisprig_shards",
        "enigmaticlegacy:infinimeal",
        "kubejs:life_essence",
        "kubejs:life_essence",
        "kubejs:nature_essence",
        "kubejs:nature_essence",
        "kubejs:nature_essence",
        "kubejs:nature_essence"],
        "ars_nouveau:green_archwood_sapling")

     tree_ritual("ars_nouveau:drygmy_charm",
        ["ars_nouveau:drygmy_shard",
        "golden_sword",
        "golden_sword",
        "golden_sword",
        "kubejs:death_essence",
        "kubejs:death_essence",
        "kubejs:death_essence",
        "kubejs:death_essence"],
        "ars_nouveau:green_archwood_sapling")

     tree_ritual("ars_nouveau:wixie_charm",
        ["ars_nouveau:wixie_shards",
        "naturesaura:auto_crafter",
        "woodenhopper:wooden_hopper",
        "woodenhopper:wooden_hopper",
        "kubejs:infused_amethyst",
        "minecraft:amethyst_shard",
        "kubejs:infused_amethyst",
        "minecraft:amethyst_shard"],
        "ars_nouveau:purple_archwood_sapling")
     
     tree_ritual("4x twilightforest:ironwood_ingot",[
          "#forge:ingots/gold",
          "#forge:ingots/gold",
          "#forge:ingots/iron",
          "twilightforest:liveroot",
          "#forge:ingots/iron",
          "twilightforest:liveroot",
          "twilightforest:liveroot",
          "#forge:ingots/iron",
     ],"twilightforest:twilight_oak_sapling")


     //============================================= Seeds and Saplings =============================================

     tree_ritual("nether_wart",
          [
               "red_mushroom",
               "soul_sand",
               "rotten_flesh",
               "rotten_flesh",
               "rotten_flesh",
               "rotten_flesh",
               "rotten_flesh",
               "rotten_flesh"
          ],
          "minecraft:jungle_sapling"
     )

     const elements = ["water","air","fire","earth"]

     elements.forEach(element => {

          tree_ritual("wizards_reborn:"+element+"_crystal_seed",
          [
               "wizards_reborn:arcanum_seed",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
               "kubejs:"+element+"_infused_arcanum",
          ],
          "wizards_reborn:arcane_wood_sapling"
          ).id("wizards_reborn:wissen_crystallizer/"+element+"_crystal_seed")
          
     });

     tree_ritual("wizards_reborn:arcane_linen_seeds",
          [
               "wheat_seeds",
               "wheat_seeds",
               "#forge:dusts/gold",
               "#forge:dusts/gold",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust"
          ],
          "acacia_sapling"
     ).id("wizards_reborn:wissen_crystallizer/arcane_linen_seeds")

     tree_ritual("ars_nouveau:magebloom_crop",
          [
               "wizards_reborn:arcane_linen_seeds",
               "wizards_reborn:arcane_linen_seeds",
               "ars_nouveau:sourceberry_bush",
               "ars_nouveau:sourceberry_bush",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem"
          ],
          "ars_nouveau:purple_archwood_sapling"
     )

     tree_ritual("wizards_reborn:cork_bamboo_seed",
          [
               "wizards_reborn:arcane_linen_seeds",
               "wizards_reborn:arcane_linen_seeds",
               "bamboo",
               "bamboo",
               "bamboo",
               "bamboo",
               "bamboo",
               "bamboo"
          ],
          "spruce_sapling"
     )

     tree_ritual("2x wizards_reborn:arcanum_seed",
          [
               "wizards_reborn:arcane_linen_seeds",
               "wizards_reborn:arcane_linen_seeds",
               "ars_nouveau:magebloom_crop",
               "ars_nouveau:magebloom_crop",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust"
          ],
          "wizards_reborn:arcane_wood_sapling"
     ).id("wizards_reborn:crystal_infusion/arcanum_seed")

     tree_ritual("chorus_flower",
          [
               "wizards_reborn:cork_bamboo",
               "wizards_reborn:cork_bamboo",
               "ender_pearl",
               "ender_pearl",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem"
          ],
          "biomeswevegone:indigo_jacaranda_sapling"
     )

     tree_ritual("wizards_reborn:arcane_wood_sapling",
          [
               "naturesaura:ancient_sapling",
               "#forge:dusts/gold",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
               "wizards_reborn:arcanum_dust",
          ],
          "biomeswevegone:blue_spruce_sapling"
     )

    
     tree_ritual("wizards_reborn:innocent_wood_sapling",
          [
               "wizards_reborn:arcane_wood_sapling",
               "diamond",
               "diamond",
               "diamond",
               "quartz_block",
               "quartz_block",
               "quartz_block",
               "quartz_block"
          ],
          "cherry_sapling"
     ).id("wizards_reborn:crystal_infusion/innocent_wood_sapling")

     function TallFlower(output,flower,color,sapling)
     {
          tree_ritual(output,
          [   
               flower,
               "minecraft:grass",
               "minecraft:"+color+"_dye",
               "minecraft:"+color+"_dye",
               "minecraft:"+color+"_dye",
               "minecraft:"+color+"_dye",
               "minecraft:"+color+"_dye",
               "minecraft:"+color+"_dye"
          ],
               sapling,100
          )
     }

     TallFlower("minecraft:sunflower","#minecraft:flowers","yellow","oak_sapling")
     TallFlower("minecraft:lilac","#minecraft:flowers","magenta","birch_sapling")
     TallFlower("minecraft:peony","#minecraft:flowers","pink","spruce_sapling")
     TallFlower("minecraft:rose_bush","#minecraft:flowers/roses","red","oak_sapling")
     TallFlower("biomeswevegone:blue_rose_bush","#minecraft:flowers/roses","blue","spruce_sapling")
     TallFlower("biomeswevegone:delphinium","#minecraft:flowers","blue","jungle_sapling")
     TallFlower("biomeswevegone:foxglove","#minecraft:flowers","cyan","jungle_sapling")
     TallFlower("biomeswevegone:japanese_orchid","#minecraft:flowers/orchid","pink","cherry_sapling")
     TallFlower("biomeswevegone:tall_white_allium","#biomeswevegone:flowers/alliums","white","oak_sapling")
     TallFlower("biomeswevegone:tall_allium","#biomeswevegone:flowers/alliums","magenta","oak_sapling")
     TallFlower("biomeswevegone:tall_pink_allium","#biomeswevegone:flowers/alliums","pink","oak_sapling")
     TallFlower("biomeswevegone:magenta_pitcher_plant","minecraft:pitcher_pod","pink","jungle_sapling")
     TallFlower("biomeswevegone:cyan_pitcher_plant","minecraft:pitcher_pod","cyan","jungle_sapling")
     

     tree_ritual("naturesaura:token_joy",
	[
          "#forge:gems/arcanum",
          "kubejs:basic_token",
          "minecraft:sunflower",
          "minecraft:sunflower",
          "minecraft:sunflower",
          "minecraft:sunflower",
          "minecraft:sunflower",
          "minecraft:sunflower"],
          "oak_sapling",100
     ).id("naturesaura:tree_ritual/token_joy")

	tree_ritual("naturesaura:token_sorrow",
	[
          "#forge:dusts/redstone",
          "kubejs:basic_token",
          "crying_obsidian",
          "crying_obsidian",
          "crying_obsidian",
          "crying_obsidian",
          "crying_obsidian",
          "crying_obsidian"],
          "quark:blue_blossom_sapling",100
     ).id("naturesaura:tree_ritual/token_sorrow")

	tree_ritual("naturesaura:token_fear",
	[
          "#forge:gems/arcanum",
          "kubejs:basic_token",
          "carved_pumpkin",
          "carved_pumpkin",
          "carved_pumpkin",
          "carved_pumpkin",
          "carved_pumpkin",
          "carved_pumpkin"],
          "quark:lavender_blossom_sapling",100
     ).id("naturesaura:tree_ritual/token_fear")

	tree_ritual("naturesaura:token_anger",
	[
          "#forge:gems/amethyst",
          "kubejs:basic_token",
          "immersive_weathering:vitrified_sand",
          "immersive_weathering:vitrified_sand",
          "immersive_weathering:vitrified_sand",
          "immersive_weathering:vitrified_sand",
          "immersive_weathering:vitrified_sand",
          "immersive_weathering:vitrified_sand"],
          "quark:red_blossom_sapling",100
     ).id("naturesaura:tree_ritual/token_anger")

     //==============================================Alloys===========================================

     tree_ritual("2x kubejs:source_alloy_ingot",
          [
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "ars_nouveau:source_gem",
               "#forge:dusts/gold",
               "#forge:dusts/gold",
               "#forge:dusts/gold"],
               "ars_nouveau:purple_archwood_sapling",100
     )
	
	tree_ritual("2x kubejs:arcanum_alloy_ingot",
          [
               "wizards_reborn:arcanum",
               "wizards_reborn:arcanum",
               'wizards_reborn:arcanum',
               "#forge:dusts/iron",
               "#forge:dusts/iron",
               "#forge:dusts/iron"],
               "birch_sapling",100
     )

     tree_ritual("kubejs:storm_ingot",
          [
               "kubejs:arcanum_alloy_ingot",
               "kubejs:arcanum_alloy_ingot",
               "ars_nouveau:air_essence",
               "ars_nouveau:air_essence",
               "ars_nouveau:air_essence",
               "ars_nouveau:air_essence"],
               "birch_sapling",100
     )

     tree_ritual("4x thermal:bronze_ingot",
          [
               "#forge:ingots/tin",
               "#forge:ingots/tin",
               "#forge:ingots/copper",
               "#forge:ingots/copper",
               "#forge:ingots/copper",
               "#forge:ingots/copper",
               "#forge:ingots/copper",
               "#forge:ingots/copper"
          ],
          "jungle_sapling"
     )

     tree_ritual("2x create:brass_ingot",
          [
               "#forge:ingots/zinc",
               "#forge:ingots/zinc",
               "#forge:ingots/copper",
               "#forge:ingots/copper"
          ],
          "jungle_sapling"
     )
})