onEvent('recipes', event => {

    const id_prefix = 'tconstruct:kubejs/casting_table';

    const recipes = [
        {
            fluid: 'emendatusenigmatica:molten_nebu',
            amount: 144,
            cast: 'tconstruct:ingot_cast',
            consumed: false,
            result: 'atum:nebu_ingot',
            time: 60,
            id: 'nebu_ingot_gold_cast'
        },
        {
            fluid: 'emendatusenigmatica:molten_nebu',
            amount: 144,
            cast: '#tconstruct:casts/single_use/ingot',
            consumed: true,
            result: 'atum:nebu_ingot',
            time: 60,
            id: 'nebu_ingot_sand_cast'
        },
        {
            fluid: 'emendatusenigmatica:molten_nebu',
            amount: 16,
            cast: 'tconstruct:nugget_cast',
            consumed: false,
            result: 'atum:nebu_drop',
            time: 10,
            id: 'nebu_drop_gold_cast'
        },
        {
            fluid: 'emendatusenigmatica:molten_nebu',
            amount: 16,
            cast: '#tconstruct:casts/single_use/nugget',
            consumed: true,
            result: 'atum:nebu_drop',
            time: 10,
            id: 'nebu_drop_sand_cast'
        },
        {
            fluid: 'tconstruct:seared_stone',
            amount: 144,
            cast: 'tconstruct:clear_glass_pane',
            consumed: true,
            result: 'tconstruct:seared_glass_pane',
            time: 40,
            id: 'seared_glass_pane'
        },
        {
            fluid: 'tconstruct:molten_rose_gold',
            amount: 288,
            cast: 'eidolon:tattered_cloth',
            consumed: true,
            result: 'tconstruct:silky_cloth',
            time: 80,
            id: 'silky_cloth'
        },
        {
            fluid: 'tconstruct:molten_brass',
            amount: 144,
            cast: 'mob_grinding_utils:solid_xp_baby',
            consumed: true,
            result: 'mob_grinding_utils:solid_xp_mould_baby',
            time: 40,
            id: 'solid_xp_mould_baby'
        },
        {
            fluid: 'thermal:latex',
            amount: 250,
            cast: 'tconstruct:ingot_cast',
            consumed: false,
            result: 'thermal:rubber',
            time: 120,
            id: 'rubber_gold_cast'
        },
        {
            fluid: 'thermal:latex',
            amount: 250,
            cast: '#tconstruct:casts/single_use/ingot',
            consumed: true,
            result: 'thermal:rubber',
            time: 120,
            id: 'rubber_sand_cast'
        }
    ];

    const toolParts = [
        'repair_kit',
        'pickaxe_head',
        'small_axe_head',
        'small_blade',
        'hammer_head',
        'broad_blade',
        'broad_axe_head',
        'tool_binding',
        'large_plate',
        'tool_handle',
        'tough_handle'
    ];

    const parts = [
        'ingot',
        'nugget',
        'gem',
        'rod',
        'plate',
        'coin',
        'wire',
    ];

    recipes.forEach(recipe => {
        event.custom({
            type: 'tconstruct:casting_table',
            cast: Ingredient.of(recipe.cast).toJson(),
            cast_consumed: recipe.consumed,
            fluid: {
                name: recipe.fluid,
                amount: recipe.amount
            },
            result: Item.of(recipe.result).toResultJson(),
            cooling_time: recipe.time
        }).id(`${id_prefix}/${recipe.id}`);
    });

    parts.forEach((part) => {
        event.custom({
            type: 'tconstruct:casting_table',
            cast: { tag: `forge:${part}s` },
            cast_consumed: true,
            fluid: {
                name: 'materialis:molten_arcane_gold', 
                amount: 144
            },
            result: Item.of(`tconstruct:${part}_cast`).toResultJson(),
            cooling_time: 40 
        }).id(`${id_prefix}/${part}_cast`);
    });

    toolParts.forEach((toolPart) => {
        event.custom({
            type: 'tconstruct:casting_table',
            cast: { item: `tconstruct:${toolPart}` },
            cast_consumed: true,
            fluid: {
                name: 'materialis:molten_arcane_gold', 
                amount: 144
            },
            result: Item.of(`tconstruct:${toolPart}_cast`).toResultJson(),
            cooling_time: 40 
        }).id(`${id_prefix}/${toolPart}_cast`);
    });

    event.custom({
        type: 'tconstruct:casting_table',
        cast: { tag: 'forge:inlays' },
        cast_consumed: true,
        fluid: {
            name: 'materialis:molten_arcane_gold', 
            amount: 144
        },
        result: Item.of('materialis:inlay_cast').toResultJson(),
        cooling_time: 40 
    }).id(`${id_prefix}/inlay_cast`);
    event.custom({
        type: 'tconstruct:casting_table',
        cast: { item: 'materialis:wrench_head' },
        cast_consumed: true,
        fluid: {
            name: 'materialis:molten_arcane_gold', 
            amount: 144
        },
        result: Item.of('materialis:wrench_head_cast').toResultJson(),
        cooling_time: 40 
    }).id(`${id_prefix}/wrench_head_cast`);

    



})