ServerEvents.recipes(event => {
    /*
            Build grist
        none -> basic: create a pulverizer, grind sand into grist -> make basic tier of machines and tools (pulverizer, redstone furnace, alloy smelter, )
            basic grist only comes from pulverizing sand into grist, or you get 4x from pulverizing improved grist
            pulverizer would require a tin gear which requires four tin ingots plus either one build grist or diamond in the center
        basic -> improved: create cobble to gravel to sand to grist generator (with basic power + basic automation) -> overcome the cost of newer machines, world building gadgets, automate food production
            full machine would require some pipes automation (intelligent), power (energetic), and food to harvest the materials (agricultural)
            all machines required would need gears made from one build grist in the center
                machines: pulverizier, sequential crafter...?
            after you get improved, you can make the gear die and make gears without grist
                3x improved grist can also come from alloy smelting cobblestone, gravel, sand in the right quantities
    */

    /*
    2x Basic build grist comes from smelting build grist with primordeal
    Your first build grist comes from smelting refined aggregate
    refined aggregate comes from pulverizing reduced aggregate, which comes from coarse aggregate
    coarse aggregate comes from combining sand, clay, gravel, primordeal with an ore hammer.

    Instead of an ore hammer, you can use a heated mixer with create
    */
    event.recipes.thermal.smelter(
        '2x kubejs:grist_build_basic',
        ['#kubejs:grist/build/basic', 'kubejs:grist_primordeal_basic_block']
    );
    event.custom({
        type: 'create:mixing',
        ingredients: [
            '#kubejs:grist/build/basic',
            'kubejs:grist_primordeal_basic_block',
        ],
        heatRequirement: "heated",
        results: [
            '2x kubejs:grist_build_basic'
        ]
    });
    event.smelting('16x kubejs:grist_build_basic', 'kubejs:refined_grist_aggregate');
    event.recipes.shapeless(
        'kubejs:coarse_grist_aggregate', [
        '3x #forge:sand',
        'minecraft:clay_ball',
        '3x #forge:gravel',
        '#alltheores:ore_hammers',
        'kubejs:grist_primordeal_basic_block'
    ]).id('kubejs:coarse_grist_aggregate_manual_only');
    event.custom({
        type: 'create:mixing',
        ingredients: [
            '3x #forge:sand',
            'minecraft:clay_ball',
            '3x #forge:gravel',
            'kubejs:grist_primordeal_basic_block'
        ],
        heatRequirement: "heated",
        results: [
            'kubejs:coarse_grist_aggregate'
        ]
    });
    event.recipes.shapeless(
        'kubejs:reduced_grist_aggregate', [
        '#alltheores:ore_hammers',
        'minecraft:granite',
        'kubejs:grist_primordeal_basic',
        '6x kubejs:coarse_grist_aggregate'
    ]).id('kubejs:reduced_grist_aggregate_manual_only');
    event.custom({
        type: 'create:mixing',
        ingredients: [
            'minecraft:granite',
            'kubejs:grist_primordeal_basic',
            '6x kubejs:coarse_grist_aggregate'
        ],
        heatRequirement: "heated",
        results: [
            'kubejs:reduced_grist_aggregate'
        ]
    });
    event.recipes.shapeless(
        '2x kubejs:refined_grist_aggregate', [
        '#alltheores:ore_hammers',
        'kubejs:grist_primordeal_basic',
        '5x kubejs:reduced_grist_aggregate'
    ]).id('kubejs:refined_grist_aggregate_manual_only');
    event.custom(
        {
            type: 'create:mixing',
            ingredients: [
                'kubejs:grist_primordeal_basic',
                '5x kubejs:reduced_grist_aggregate'
            ],
            heatRequirement: "heated",
            results: [
                'kubejs:refined_grist_aggregate'
            ]
        }
    );

    /*
    improved grist comes from crystalizing clay + improved + primordeal liquid
    your first improved comes from crystalizing 32 reinforced grist ingots with improved primordeal liquid
    grist ingots come from 9 grist nuggets in a servo press
    reinforced grist nuggets come from grist blend in a centrifugal separator
    grist blend comes from basic + improved primordeal block + sulfur in induction smelter
    */
    event.recipes.thermal.crystallizer(
        '4x kubejs:grist_build_improved',
        ['4x minecraft:clay', '2x #kubejs:grist/build/improved', Fluid.of('kubejs:grist_primordeal_improved_fluid', 4500)]
    );
    event.recipes.thermal.crystallizer(
        'kubejs:grist_build_improved',
        ['32x kubejs:reinforced_grist_ingot', Fluid.of('kubejs:grist_primordeal_improved_fluid', 4000)]
    );

    event.custom({
        type: "thermal:press",
        ingredients: [
            { item: 'kubejs:reinforced_grist_nugget', count: 9 },
            { item: "thermal:press_packing_3x3_die" }
        ],
        result: [{item: 'kubejs:reinforced_grist_ingot'}]
    });

    event.custom({
        type: "thermal:centrifuge",
        ingredients: [
            { item: 'kubejs:reinforced_grist_blend' },
        ],
        result: [{item: 'kubejs:reinforced_grist_nugget', chance: 0.3}]
    });

    event.recipes.thermal.smelter(
        'kubejs:reinforced_grist_blend',
        ['32x #kubejs:grist/build/basic', '3x kubejs:grist_primordeal_improved_block', '2x #forge:dusts/sulfur']
    );

    /*
    improved -> radiant: process ores with power generation, new machines, and tool enchants into smelting up grist alloys -> near creative mode world shaping tools, crafting any block
            three grades of grist alloy ingots: tempered, perfect, and flawed
            radiant grist requires energizing a block of tempered alloy

            block of tempered alloy comes from 9 tempered ingots
            tempered ingot comes from 9 tempered nuggets + grist paste in a smelter
            tempered nuggets come from centrifuing a filled crucible
            filled crucibles come from chilling a hot filled crucible
            hot filled crucibles come from energizing tempered nuggets with 1x lumium, 1x signalum, 1x improved build block, 1x crucible

            perfect alloy comes from smelting perfect alloy nuggets with intelligent catalysts + advanced powder power powder (gemium?)
            perfect alloy nugget comes from solidifying 1000mb of liquid alloy in blast chiller with ingot mold
            100mb liquid alloy comes from melting one flawed ingot

            flawed ingots come from energizing 9 flawed nuggets with tremendous power
            flawed nuggets come from ars enchanting with 8x advanced powders around 1x improved build
    */
});