//priority: 0
ItemEvents.modification(event => {
    function fastToEat(x) {
        event.modify(x, item => {item.foodProperties = food => {food.fastToEat()}})
    }
    function restore0_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(1).saturation(0.5)}})
    }
    function restore1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(2).saturation(0.5)}})
    }
    function restore1_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(3).saturation(0.5)}})
    }
    function restore2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(4).saturation(0.5)}})
    }
    function restore2_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(5).saturation(0.5)}})
    }
    function restore3(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(6).saturation(0.5)}})
    }
    function restore3_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(7).saturation(0.5)}})
    }
    function restore4(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(8).saturation(0.5)}})
    }
    function restore4_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(9).saturation(0.5)}})
    }
    function restore5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(10).saturation(0.5)}})
    }
    function restore6(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(12).saturation(0.5)}})
    }
    function restore7(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(14).saturation(0.5)}})
    }
    function restore8(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(16).saturation(0.5)}})
    }
    function restore9(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(18).saturation(0.5)}})
    }
    function restore10(x) {
        event.modify(x, item => {item.foodProperties = food => {food.hunger(20).saturation(0.5)}})
    }
    function candyRush0_5(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('speed', 100, 0, 100)}})
    }
    function candyRush1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('speed', 200, 0, 100)}})
    }
    function candyRush2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('speed', 400, 0, 100)}})
    }
    function saltyRush1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('resistance', 200, 0, 100)}})
    }
    function saltyRush2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('resistance', 400, 0, 100)}})
    }
    function rawMeat(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('poison', 200, 0, 100).effect('nausea', 100, 0, 100)}})
    }
    function jumpySnack1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('jump_boost', 200, 0, 100)}})
    }
    function jumpySnack2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('jump_boost', 400, 0, 100)}})
    }
    function seashoreBounty1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('water_breathing', 100, 0, 100)}})
    }
    function seashoreBounty2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('water_breathing', 200, 0, 100)}})
    }
    function superFood(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('saturation', 200, 0, 100)}})
    }
    function weirdVanishing1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('invisibility', 200, 0, 100)}})
    }
    function weirdVanishing2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('invisibility', 400, 0, 100)}})
    }
    function goldenBuffCarrot(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('haste', 600, 0, 100).effect('regeneration', 100, 1, 100)}})
    }
    function goldenBuffCordyceps(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('night_vision', 600, 0, 100).effect('regeneration', 100, 1, 100)}})
    }
    function goldenBuffPotato(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('strength', 600, 0, 100).effect('regeneration', 100, 1, 100)}})
    }
    function notAGoodIdea1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('slowness', 400, 0, 100).effect('mining_fatigue', 100, 0, 100)}})
    }
    function insomnia1(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('slowness', 600, 0, 100).effect('mining_fatigue', 600, 0, 100).effect('minecraft:darkness', 600, 0, 100)}})
    }
    function insomnia2(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('slowness', 1000, 0, 100).effect('mining_fatigue', 1000, 0, 100).effect('minecraft:darkness', 1000, 0, 100)}})
    }
    function bakeryBoost(x) {
        event.modify(x, item => {item.foodProperties = food => {food.effect('regeneration', 100, 0, 100)}})
    }

//Fruits & Veggies
    restore0_5('minecraft:melon_slice')
    restore0_5('upgrade_aquatic:mulberry')
    fastToEat('upgrade_aquatic:mulberry')
    seashoreBounty1('upgrade_aquatic:mulberry')

    restore1('minecraft:apple')
    restore1('minecraft:golden_apple')
    restore1('minecraft:enchanted_golden_apple')

    restore0_5('minecraft:sweet_berries')
    fastToEat('minecraft:sweet_berries')

    restore1('farmersdelight:pumpkin_slice')
    restore1('minecraft:potato')

    restore1('minecraft:carrot')
    restore1('minecraft:beetroot')

    restore1('quark:ancient_fruit')
    restore2('ecologics:cooked_prickly_pear')
    weirdVanishing2('ecologics:cooked_prickly_pear')

    restore2('minecraft:baked_potato')

    restore2('minecraft:mushroom_stew')
    saltyRush1('minecraft:mushroom_stew')

    restore1('spelunkery:grilled_portabella')

    restore0_5('spelunkery:portabella')
    rawMeat('spelunkery:portabella')

    restore0_5('ecologics:walnut')
    restore0_5('phantasmd:oblifruit')
    restore0_5('phantasm:pream_berry')

    restore0_5('spelunkery:button_mushroom')
    rawMeat('spelunkery:button_mushroom')
    event.modify('spelunkery:button_mushroom', item => {
        item.foodProperties = food => {
            food
            .effect('slowness', 400, 0, 100)
            .effect('night_vision', 100, 0, 100)
        }
    })

    restore0_5('spelunkery:crimini')
    rawMeat('spelunkery:crimini')
    notAGoodIdea1('spelunkery:crimini')

    restore1('farmersdelight:rice')

    restore1_5('minecraft:suspicious_stew')

//Sweets
    restore0_5('supplementaries:candy')
    candyRush0_5('supplementaries:candy')
    fastToEat('supplementaries:candy')

    restore1('create:bar_of_chocolate')
    candyRush1('create:bar_of_chocolate')

    restore1_5('create:chocolate_glazed_berries')
    candyRush1('create:chocolate_glazed_berries')

    restore2('create:honeyed_apple')
    candyRush1('create:honeyed_apple')

    jumpySnack1('kubejs:marshmallow')

    restore1('upgrade_aquatic:mulberry_jam_bottle')
    candyRush1('upgrade_aquatic:mulberry_jam_bottle')
    seashoreBounty1('upgrade_aquatic:mulberry_jam_bottle')

//Bakery
    bakeryBoost('kubejs:waffle')
    bakeryBoost('kubejs:croissant')

    restore2('minecraft:bread')
    restore2('minecraft:honey_bottle')
    candyRush2('minecraft:honey_bottle')

    restore1('minecraft:cookie')
    fastToEat('minecraft:cookie') 
    
    restore1_5('farmersdelight:honey_cookie')
    fastToEat('farmersdelight:honey_cookie')
    candyRush1('farmersdelight:honey_cookie')
    
    restore1('farmersdelight:sweet_berry_cookie')
    fastToEat('farmersdelight:sweet_berry_cookie')
    candyRush1('farmersdelight:sweet_berry_cookie')

    restore0_5('hauntedharvest:popcorn')

    notAGoodIdea1('kubejs:butter')

    candyRush2('kubejs:carrot_cake')

//Cakes
    
    restore7('minecraft:pumpkin_pie')
    saltyRush2('minecraft:pumpkin_pie')

    restore6('upgrade_aquatic:mulberry_pie')
    candyRush2('upgrade_aquatic:mulberry_pie')
    seashoreBounty2('upgrade_aquatic:mulberry_pie')

//Meat
    restore1('minecraft:beef')
    rawMeat('minecraft:beef')
    restore3('minecraft:cooked_beef')

    restore1('minecraft:porkchop')
    rawMeat('minecraft:porkchop')
    restore3('minecraft:cooked_porkchop')

    restore1('minecraft:chicken')
    rawMeat('minecraft:chicken')

    rawMeat('minecraft:cod')
    rawMeat('rediscovered:raw_fish')
    rawMeat('upgrade_aquatic:lionfish')
    rawMeat('upgrade_aquatic:perch')

    restore2('upgrade_aquatic:pike')
    rawMeat('upgrade_aquatic:pike')

    rawMeat('minecraft:rotten_flesh')

    restore2('rediscovered:cooked_fish')
    weirdVanishing1('rediscovered:cooked_fish')

    restore2('alexsmobs:cosmic_cod')
    rawMeat('alexsmobs:cosmic_cod')

    rawMeat('alexsmobs:raw_catfish')
    restore3('alexsmobs:cooked_catfish')

//Vegan Meat
    restore3('farmersdelight:beef_patty')
    saltyRush1('farmersdelight:beef_patty')

//Hearty Meals
    restore1('culturaldelights:corn_dough')
    notAGoodIdea1('culturaldelights:corn_dough')
    restore2('culturaldelights:tortilla')

    restore2('farmersdelight:fried_egg')

    restore7('culturaldelights:chicken_taco')
    superFood('culturaldelights:chicken_taco')

    restore6('farmersdelight:chicken_sandwich')
    superFood('farmersdelight:chicken_sandwich')

    restore8('culturaldelights:beef_burrito')
    superFood('culturaldelights:beef_burrito')
    saltyRush2('culturaldelights:beef_burrito')

    restore8('farmersdelight:hamburger')
    superFood('farmersdelight:hamburger')

    restore2_5('culturaldelights:rice_ball')

    restore6('farmersdelight:cabbage_rolls')

//Golden Things:
    restore1('minecraft:golden_carrot')
    goldenBuffCarrot('minecraft:golden_carrot')

    restore1('galosphere:golden_lichen_cordyceps')
    goldenBuffCordyceps('galosphere:golden_lichen_cordyceps')

    goldenBuffPotato('kubejs:golden_potato')

//Potions:

    insomnia1(Item.of('minecraft:potion', '{Damage:0,Potion:\'upgrade_aquatic:insomnia\'}'))
    insomnia2(Item.of('minecraft:potion', '{Damage:0,Potion:\'upgrade_aquatic:insomnia_strong\'}'))
})
