ServerEvents.recipes(event => {
    //slices
    event.remove({ id: 'minecraft:melon' })
    event.remove({ id: 'farmersdelight:pumpkin_from_slices' })
    event.remove({ id: 'farmersdelight:cake_from_slices' })
    event.remove({ id: 'farmersdelight:apple_pie_from_slices' })
    event.remove({ id: 'farmersdelight:chocolate_pie_from_slices' })
    event.remove({ id: 'farmersdelight:sweet_berry_cheesecake_from_slices' })
    event.remove({ id: 'brewinandchewin:quiche_from_slices' })
    event.remove({ id: 'brewinandchewin:pizza_from_slices' })
    event.remove({ id: 'create_central_kitchen:crafting/honey_cake_from_slices' })
    event.remove({ id: 'create_central_kitchen:crafting/chocolate_cake_from_slices' })
    event.remove({ id: 'create_central_kitchen:crafting/pumpkin_pie_from_slices' })

    //fixes
    //event.remove({ input: 'create:dough' })
    event.replaceInput({ input: 'create:dough' }, 'create:dough', 'farmersdelight:wheat_dough')
    event.remove({ id: 'actuallyadditions:rice_dough_smelting' })
    event.remove({ id: 'minecraft:bread' }) //now requires processing wheat first
    event.remove({ id: 'minecraft:mushroom_stew' })
    event.remove({ id: 'minecraft:beetroot_soup' })
    event.remove({ id: 'minecraft:rabbit_stew_from_brown_mushroom' })
    event.remove({ id: 'minecraft:rabbit_stew_from_red_mushroom' })
    event.remove({ id: 'minecraft:golden_carrot' })
    event.remove({ id: 'minecraft:golden_apple' })
    event.remove({ id: 'minecraft:glistering_melon_slice' })
    event.remove({ id: 'neapolitan:milk/milk_bottles_from_bucket' })
    event.remove({ id: 'neapolitan:milk/milk_bucket_from_bottles' })
    event.remove({ id: 'create:filling/compat/neapolitan/milk_bottle' }) //incorrect bottle amount allowed duping
    event.remove({ id: 'thermal:cheese_wheel' })
    event.remove({ id: 'thermal:spring_salad' })
    event.remove({ id: 'thermal:hearty_stew' })
    event.remove({ id: 'thermal:xp_stew' })
    event.remove({ id: 'thermal:stuffed_pumpkin' })
    event.remove({ id: 'thermal:stuffed_pepper' })
    event.remove({ id: 'thermal:sushi_maki_8' })
    event.remove({ output: 'thermal:carrot_block' })
    event.remove({ output: 'thermal:potato_block' })
    event.remove({ output: 'thermal:beetroot_block' })
    event.remove({ output: 'thermal:flax_block' })
    event.remove({ output: 'thermal:onion_block' })
    event.remove({ output: 'thermal:strawberry_block' })
    event.remove({ output: 'thermal:tomato_block' })
    event.remove({ output: 'thermal:rice_block' })
    event.remove({ output: 'thermal:tomato_sauce' })
    event.remove({ id: 'farmersdelight:cutting/chicken' })
    event.recipes.farmersdelight.cutting(
        "minecraft:chicken",
        "#forge:tools/knives",
        ["2x farmersdelight:chicken_cuts", Item.of("farmersdelight:chicken_cuts").withChance(0.3), "minecraft:bone_meal"]
    );

    event.replaceInput({ input: 'neapolitan:strawberries' }, 'neapolitan:strawberries', '#forge:fruits/strawberry')
    event.replaceInput({ output: 'thermal:jelly' }, 'thermal:strawberry', '#forge:fruits/strawberry')
    event.replaceInput({ output: 'thermal:pbj_sandwich' }, 'thermal:jelly', ['thermal:jelly', 'brewinandchewin:sweet_berry_jam'])
    event.remove({ output: 'neapolitan:strawberry_basket' })
    event.shapeless('neapolitan:strawberry_basket', ['9x neapolitan:strawberries'])

    event.remove({ id: 'enderio:cake' })
    event.remove({ id: 'enderio:alloy_smelting/cake_base' })
    event.remove({ id: 'create:crafting/curiosities/cake' })
    event.remove({ id: 'enderio:sag_milling/wheat' })
    event.remove({ output: 'create:dough' })
    event.remove({ output: 'farmersdelight:wheat_dough' })
    event.shapeless('farmersdelight:wheat_dough', [
        '#forge:eggs','#forge:flour','#forge:flour','#forge:flour'
    ])
    event.recipes.create.mixing('farmersdelight:wheat_dough',
        [Fluid.of('minecraft:water', 1000), '3x #forge:flour'])
    event.remove({ id: 'farmersdelight:pie_crust' })
    event.shaped('farmersdelight:pie_crust', [
        'wmw',
        ' w ',
        '   '
    ], { w: '#forge:flour', m: '#forge:milk' })
    event.shapeless('createaddition:cake_base', ['#forge:eggs', '2x minecraft:sugar', 'farmersdelight:wheat_dough'])
    event.remove({ output: 'minecraft:cake' })
    event.shaped('minecraft:cake', [
        ' b ',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', b: 'minecraft:sweet_berries' })
    event.remove({ id: 'neapolitan:vanilla/vanilla_cake' })
    event.shaped('neapolitan:vanilla_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'neapolitan:dried_vanilla_pods' })
    event.remove({ id: 'neapolitan:chocolate/chocolate_cake' })
    event.shaped('neapolitan:chocolate_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'neapolitan:chocolate_bar' })
    event.remove({ id: 'neapolitan:strawberry/strawberry_cake' })
    event.shaped('neapolitan:strawberry_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: '#forge:fruits/strawberry' })
    event.remove({ id: 'neapolitan:banana/banana_cake' })
    event.shaped('neapolitan:banana_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'neapolitan:banana' })
    event.remove({ id: 'neapolitan:mint/mint_cake' })
    event.shaped('neapolitan:mint_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'neapolitan:mint_leaves' })
    event.remove({ id: 'neapolitan:adzuki/adzuki_cake' })
    event.shaped('neapolitan:adzuki_cake', [
        'fff',
        'mmm',
        ' c '
    ], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'neapolitan:roasted_adzuki_beans' })
    event.remove({ id: 'thermal:carrot_cake' })
    event.remove({ id: 'thermal:chocolate_cake' })
    event.remove({ id: 'thermal:spice_cake' })
    event.remove({ id: 'thermal:green_bean_pie' })
    //event.shaped('thermal:carrot_cake', [
    //    'fff',
    //    'mmm',
    //    ' c '
    //], { c: 'createaddition:cake_base_baked', m: '#forge:milk', f: 'minecraft:carrot' }) //GIVES NIGHT VISION???
    //event.recipes.create.filling('minecraft:cake',['createaddition:cake_base_baked', Fluid.of('minecraft:milk', 1000)])
    //event.shapeless('farmersdelight:wheat_dough', [
    //    'minecraft:water_bucket', '#forge:flour', '#forge:flour', '#forge:flour'
    //])
    //event.shapeless('farmersdelight:wheat_dough', [
    //    Item.of('ceramicbucket:ceramic_bucket', '{Fluid:{Amount:1000,FluidName:"minecraft:water"}}').weakNBT(), '#forge:flour', '#forge:flour', '#forge:flour'
    //]).replaceIngredient({ item: 'ceramicbucket:ceramic_bucket' }, 'ceramicbucket:ceramic_bucket')
    
    event.remove({ id: 'brewinandchewin:pizza' })
    event.shaped('refurbished_furniture:raw_vegetable_pizza', [
        'ccc',
        'iti',
        'ddd'
    ], { d: 'farmersdelight:wheat_dough', t: 'farmersdelight:tomato_sauce', c: '#brewinandchewin:cheese_wedges', i: '#brewinandchewin:pizza_toppings' })
    event.smoking('brewinandchewin:pizza', 'refurbished_furniture:raw_vegetable_pizza', 0.25, 300)

    event.campfireCooking('kubejs:cooked_pale_cod', 'kubejs:pale_cod', 0.25, 600)
    event.smelting('kubejs:cooked_pale_cod', 'kubejs:pale_cod', 0.25, 200)
    event.smoking('kubejs:cooked_pale_cod', 'kubejs:pale_cod', 0.25, 100)
    event.campfireCooking('kubejs:cooked_pale_salmon', 'kubejs:pale_salmon', 0.5, 600)
    event.smelting('kubejs:cooked_pale_salmon', 'kubejs:pale_salmon', 0.5, 200)
    event.smoking('kubejs:cooked_pale_salmon', 'kubejs:pale_salmon', 0.5, 100)
    event.campfireCooking('miners_delight:baked_squid', 'kubejs:pale_squid', 0.5, 600)
    event.smelting('miners_delight:baked_squid', 'kubejs:pale_squid', 0.5, 200)
    event.smoking('miners_delight:baked_squid', 'kubejs:pale_squid', 0.5, 100)
    event.recipes.farmersdelight.cutting(
        "kubejs:pale_squid",
        "#forge:tools/knives",
        ["minecraft:ink_sac", Item.of("minecraft:ink_sac").withChance(0.25), "miners_delight:tentacles", Item.of("2x miners_delight:tentacles").withChance(0.5)]
    );

    event.remove({ id: 'createlowheated:mixing/farmersdelight/cabbage_rolls' })
    event.recipes.create.mixing('farmersdelight:cabbage_rolls',
        ['#forge:crops/cabbage', '#farmersdelight:cabbage_roll_ingredients'])
    
    event.recipes.create.mixing('farmersdelight:nether_salad',
        ['minecraft:bowl', 'minecraft:crimson_fungus', 'minecraft:warped_fungus'])
    event.recipes.create.mixing('farmersdelight:mixed_salad',
        ['minecraft:bowl', '#forge:crops/cabbage', '#forge:crops/tomato', 'minecraft:beetroot'])
    event.recipes.create.mixing('farmersdelight:fruit_salad',
        ['minecraft:bowl', 'minecraft:apple', 'minecraft:melon_slice', 'minecraft:melon_slice', 'farmersdelight:pumpkin_slice', '#forge:berries', '#forge:berries'])
    
    event.remove({ id: 'neapolitan:chocolate/chocolate_bar' })
    event.shapeless('neapolitan:chocolate_bar', ['#forge:milk','minecraft:cocoa_beans','minecraft:sugar'])

    event.remove({ output: 'miners_delight:weird_caviar' })
    event.shapeless('2x miners_delight:weird_caviar', [
        'minecraft:bowl',
        'minecraft:bowl',
        'miners_delight:silverfish_eggs'
    ])
    event.remove({ output: 'miners_delight:insect_sandwich' })
    event.shapeless('miners_delight:insect_sandwich', [
        'minecraft:bread',
        'miners_delight:cooked_arthropod',
        '#forge:salad_ingredients/cabbage'
    ])
    event.remove({ output: 'miners_delight:insect_wrap' })
    event.shapeless('miners_delight:insect_wrap', [
        'minecraft:bread',
        'miners_delight:cooked_arthropod',
        '#forge:crops/onion'
    ])
    event.remove({ output: 'miners_delight:vegan_wrap' })
    event.shapeless('miners_delight:vegan_wrap', [
        'minecraft:bread',
        '#miners_delight:baked_cave_carrot',
        '#forge:salad_ingredients/cabbage',
        '#forge:crops/onion'
    ])
    event.remove({ output: 'miners_delight:squid_sandwich' })
    event.shapeless('miners_delight:squid_sandwich', [
        'minecraft:bread',
        'miners_delight:baked_squid',
        '#forge:salad_ingredients/cabbage'
    ])

    //Assembly
    event.remove({ id: 'create_central_kitchen:sequenced_assembly/hamburger' })
    event.recipes.createSequencedAssembly([
		'farmersdelight:hamburger'
	   ], 'minecraft:bread', [
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', 'farmersdelight:beef_patty']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:salad_ingredients/cabbage']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:crops/tomato']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:crops/onion']),
	]).transitionalItem('create_central_kitchen:incomplete_hamburger').loops(1)
    event.recipes.createSequencedAssembly([
		'miners_delight:vegan_hamburger'
	   ], 'minecraft:bread', [
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', 'miners_delight:vegan_patty']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:salad_ingredients/cabbage']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:crops/tomato']),
		event.recipes.createDeploying('create_central_kitchen:incomplete_hamburger', ['create_central_kitchen:incomplete_hamburger', '#forge:crops/onion']),
	]).transitionalItem('create_central_kitchen:incomplete_hamburger').loops(1)
    event.remove({ id: 'createlowheated:mixing/farmersdelight/stuffed_potato' })
    event.recipes.createSequencedAssembly([
		'farmersdelight:stuffed_potato'
	   ], 'minecraft:baked_potato', [
		event.recipes.createDeploying('minecraft:baked_potato', ['minecraft:baked_potato', '#forge:cooked_beef']),
        event.recipes.createFilling('minecraft:baked_potato', ['minecraft:baked_potato', Fluid.of('minecraft:milk', 250)]),
	]).transitionalItem('minecraft:baked_potato').loops(1)
    event.recipes.createSequencedAssembly([
		'farmersdelight:barbecue_stick'
	   ], 'minecraft:stick', [
		event.recipes.createDeploying('farmersdelight:barbecue_stick', ['farmersdelight:barbecue_stick', '#forge:crops/tomato']),
		event.recipes.createDeploying('farmersdelight:barbecue_stick', ['farmersdelight:barbecue_stick', '#forge:crops/onion']),
		event.recipes.createDeploying('farmersdelight:barbecue_stick', ['farmersdelight:barbecue_stick', ['#forge:foods/meat/cooked','#forge:cooked_fishes/cod','#forge:cooked_fishes/salmon','#kubejs:meat_slices']]),
	]).transitionalItem('farmersdelight:barbecue_stick').loops(1)
    event.recipes.createSequencedAssembly([
		'miners_delight:improvised_barbecue_stick'
	   ], 'minecraft:stick', [
		event.recipes.createDeploying('miners_delight:improvised_barbecue_stick', ['miners_delight:improvised_barbecue_stick', '#miners_delight:baked_cave_carrot']),
		event.recipes.createDeploying('miners_delight:improvised_barbecue_stick', ['miners_delight:improvised_barbecue_stick', '#miners_delight:bat_wing']),
		event.recipes.createDeploying('miners_delight:improvised_barbecue_stick', ['miners_delight:improvised_barbecue_stick', 'minecraft:brown_mushroom']),
	]).transitionalItem('miners_delight:improvised_barbecue_stick').loops(1)
    //cool idea, but you would lose the bowl
    /*
    event.recipes.createSequencedAssembly([
		'farmersdelight:salmon_roll'
	   ], 'farmersdelight:cooked_rice', [
		event.recipes.createDeploying('farmersdelight:salmon_roll', ['create_central_kitchen:incomplete_hamburger', 'farmersdelight:salmon_slice']),
		event.recipes.createDeploying('farmersdelight:salmon_roll', ['create_central_kitchen:incomplete_hamburger', 'farmersdelight:salmon_slice']),
	]).transitionalItem('farmersdelight:salmon_roll').loops(1)
    event.recipes.createSequencedAssembly([
		'farmersdelight:cod_roll'
	   ], 'farmersdelight:cooked_rice', [
		event.recipes.createDeploying('farmersdelight:cod_roll', ['create_central_kitchen:incomplete_hamburger', 'farmersdelight:cod_slice']),
		event.recipes.createDeploying('farmersdelight:cod_roll', ['create_central_kitchen:incomplete_hamburger', 'farmersdelight:cod_slice']),
	]).transitionalItem('farmersdelight:cod_roll').loops(1)
    */

    //Cooking
    let cookingpot = (output, ingredients, container) => {
		event.custom({
        "type": "farmersdelight:cooking",
        "container": {
            "item": container
        },
        "cookingtime": 200,
        "experience": 1.0,
        "ingredients": ingredients,
        "recipe_book_tab": "misc",
        "result": {
            "count": 1,
            "item": output
        }
    })
	}

    cookingpot("thermal:jelly", [[{"tag": "forge:fruits/strawberry"},{"item": "minecraft:sweet_berries"}],[{"tag": "forge:fruits/strawberry"},{"item": "minecraft:sweet_berries"}],[{"tag": "forge:fruits/strawberry"},{"item": "minecraft:sweet_berries"}],[{"tag": "forge:fruits/strawberry"},{"item": "minecraft:sweet_berries"}],{"item": "minecraft:sugar"}],"thermal:jar")
    event.remove({ output: 'brewinandchewin:sweet_berry_jam' })
    cookingpot("brewinandchewin:sweet_berry_jam", [{"tag": "forge:fruits/strawberry"},{"item": "minecraft:sweet_berries"},{"item": "minecraft:sugar"}],"minecraft:glass_bottle")
    event.remove({ output: 'miners_delight:insect_stew' })
    cookingpot("miners_delight:insect_stew", [{"item": "miners_delight:arthropod"},{"item": "miners_delight:arthropod"},{"item": "minecraft:potato"}],"minecraft:bowl")
    event.remove({ output: 'miners_delight:bat_soup' })
    cookingpot("miners_delight:bat_soup", [{"tag": "miners_delight:bat_wing"},{"tag": "miners_delight:bat_wing"},{"item": "minecraft:wheat"}],"minecraft:bowl")
})