// priority: 0

// Visit the wiki for more info - https://kubejs.com/

// onEvent('recipes', event => {
    
ServerEvents.recipes(event => {
    event.recipes.create.compacting(Fluid.of('thermal:redstone', 50), [Item.of('minecraft:redstone')]).heated().id('bttk:mixing/destabilized_redstone_from_redstone_heating')

    event.remove('create:crafting/materials/rose_quartz')
    event.recipes.create.compacting([Item.of('create:rose_quartz')], [
        Fluid.of('thermal:redstone', 500)
    ]).id('bttk:compacting/rose_quartz_from_destabilized_redstone')
    event.recipes.thermal.chiller('create:rose_quartz', [Fluid.of('thermal:redstone', 250), 'kubejs:chiller_crystal_cast']).id('bttk:blast_chiller/rose_quartz_from_destabilized_redstone')

    event.recipes.create.milling([Item.of('biomesoplenty:rose_quartz_chunk', 4), Item.of('biomesoplenty:rose_quartz_chunk', 2).withChance(0.35)], 'create:rose_quartz').id('bttk:milling/rose_quartz_chunk_from_rose_quartz')

    event.recipes.create.emptying(Fluid.of('biomesoplenty:blood', 50), [Item.of('biomesoplenty:rose_quartz_chunk')]).id('bttk:draining/blood_from_rose_quartz_chunk')

    event.recipes.create.compacting(Item.of('kubejs:makeshift_beef', 1), [Fluid.of('biomesoplenty:blood', 100), '#forge:dough']).id('bttk:compacting/makeshift_beef')

    event.recipes.create.haunting('minecraft:beef', 'kubejs:makeshift_beef').id('bttk:haunting/raw_beef_from_makeshift_beef')

    event.remove('garnished:sequenced_assembly/phantom_steak')
    let incompletePhantomSteak = 'garnished:incomplete_phantom_steak'
    event.recipes.create.sequenced_assembly([
        Item.of('garnished:phantom_steak', 1)
    ], 'minecraft:cooked_beef', [
        event.recipes.create.filling(incompletePhantomSteak, [incompletePhantomSteak, Fluid.of('kubejs:liquid_soul', 100)]),
        event.recipes.create.deploying(incompletePhantomSteak, [incompletePhantomSteak, '#minecraft:soul_fire_base_blocks']),
        event.recipes.create.deploying(incompletePhantomSteak, [incompletePhantomSteak, 'garnished:soul_roots']),
        event.recipes.create.deploying(incompletePhantomSteak, [incompletePhantomSteak, 'garnished:salt_compound']),
        event.recipes.create.deploying(incompletePhantomSteak, [incompletePhantomSteak, 'garnished:garnish_powder'])
    ]).transitionalItem(incompletePhantomSteak).loops(2).id('bttk:sequenced_assembly/phantom_steak')

    event.recipes.create.filling('garnished:soul_roots', ['minecraft:crimson_roots', Fluid.of('kubejs:liquid_soul', 50)])

    let siftingRecipe = (mesh, input, timeToProcess, chance, result, count) => {
        event.custom({
            type: "createsifter:sifting",
            ingredients: [
                {
                    item: mesh
                },
                {
                    item: input
                }
            ],
            processingTime: timeToProcess,
            results: [
                {
                    chance: chance,
                    item: result,
                    count: count
                }
            ]
        })
    }

    // siftingRecipe('createsifter:zinc_mesh', 'create:limestone', 200, 1.0, 'biomesoplenty:dried_salt', 1)
    event.remove('garnished:milling/crushed_salt')
    event.recipes.create.milling('biomesoplenty:dried_salt', '#create:stone_types/limestone')
    event.remove('garnished:crushing/crushed_salt')
    event.recipes.create.crushing([Item.of('garnished:crushed_salt', 1), Item.of('minecraft:iron_nugget', 2).withChance(0.10), Item.of('create:zinc_nugget', 2).withChance(0.05)], 'biomesoplenty:dried_salt')
})