ServerEvents.recipes(event => {
    let i = 0
    alloy([
        { "item": 'tfc:powder/native_silver', "count": 9 },
        { "item": 'tfc:powder/native_gold', "count": 9 },
        { "tag": 'forge:ingots/electrum', "count": 1 }],
        'thermal:electrum_ingot',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 9 },
        { "item": 'tfc:powder/sphalerite', "count": 6 },
        { "item": 'tfc:powder/bismuthinite', "count": 3 },
        { "tag": 'forge:ingots/bismuth_bronze', "count": 1 }],
        'tfc:metal/ingot/bismuth_bronze',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 9 },
        { "item": 'tfc:powder/sphalerite', "count": 6 },
        { "item": 'tfc:powder/bismuthinite', "count": 3 },
        { "tag": 'forge:ingots/bismuth_bronze', "count": 1 }],
        'tfc:metal/ingot/bismuth_bronze',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 9 },
        { "item": 'tfc:powder/sphalerite', "count": 6 },
        { "item": 'tfc:powder/bismuthinite', "count": 3 },
        { "tag": 'forge:ingots/bismuth_bronze', "count": 1 }],
        'tfc:metal/ingot/bismuth_bronze',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 10 },
        { "item": 'tfc:powder/native_gold', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 4 },
        { "tag": 'forge:ingots/black_bronze', "count": 1 }],
        'tfc:metal/ingot/black_bronze',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 10 },
        { "item": 'tfc:powder/native_gold', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 4 },
        { "tag": 'forge:ingots/black_bronze', "count": 1 }],
        'tfc:metal/ingot/black_bronze',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 10 },
        { "item": 'tfc:powder/native_gold', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 4 },
        { "tag": 'forge:ingots/black_bronze', "count": 1 }],
        'tfc:metal/ingot/black_bronze',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 16 },
        { "item": 'tfc:powder/cassiterite', "count": 2 },
        { "tag": 'forge:ingots/bronze', "count": 1 }],
        'thermal:bronze_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 16 },
        { "item": 'tfc:powder/cassiterite', "count": 2 },
        { "tag": 'forge:ingots/bronze', "count": 1 }],
        'thermal:bronze_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 16 },
        { "item": 'tfc:powder/cassiterite', "count": 2 },
        { "tag": 'forge:ingots/bronze', "count": 1 }],
        'thermal:bronze_ingot',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 16 },
        { "item": 'tfc:powder/sphalerite', "count": 2 },
        { "tag": 'forge:ingots/brass', "count": 1 }],
        'create:brass_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 16 },
        { "item": 'tfc:powder/sphalerite', "count": 2 },
        { "tag": 'forge:ingots/brass', "count": 1 }],
        'create:brass_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 16 },
        { "item": 'tfc:powder/sphalerite', "count": 2 },
        { "tag": 'forge:ingots/brass', "count": 1 }],
        'create:brass_ingot',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 4 },
        { "item": 'tfc:powder/native_gold', "count": 14 },
        { "tag": 'forge:ingots/rose_gold', "count": 1 }],
        'tfc:metal/ingot/rose_gold',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 4 },
        { "item": 'tfc:powder/native_gold', "count": 14 },
        { "tag": 'forge:ingots/rose_gold', "count": 1 }],
        'tfc:metal/ingot/rose_gold',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 4 },
        { "item": 'tfc:powder/native_gold', "count": 14 },
        { "tag": 'forge:ingots/rose_gold', "count": 1 }],
        'tfc:metal/ingot/rose_gold',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 14 },
        { "tag": 'forge:ingots/sterling_silver', "count": 1 }],
        'tfc:metal/ingot/sterling_silver',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 14 },
        { "tag": 'forge:ingots/sterling_silver', "count": 1 }],
        'tfc:metal/ingot/sterling_silver',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 4 },
        { "item": 'tfc:powder/native_silver', "count": 14 },
        { "tag": 'forge:ingots/sterling_silver', "count": 1 }],
        'tfc:metal/ingot/sterling_silver',
        2,
        400
    )

    alloy([
        { "item": 'tfc:powder/native_copper', "count": 9 },
        { "item": 'tfc:powder/garnierite', "count": 9 },
        { "tag": 'forge:ingots/constantan', "count": 1 }],
        'thermal:constantan_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/tetrahedrite', "count": 9 },
        { "item": 'tfc:powder/garnierite', "count": 9 },
        { "tag": 'forge:ingots/constantan', "count": 1 }],
        'thermal:constantan_ingot',
        2,
        400
    )
    alloy([
        { "item": 'tfc:powder/malachite', "count": 9 },
        { "item": 'tfc:powder/garnierite', "count": 9 },
        { "tag": 'forge:ingots/constantan', "count": 1 }],
        'thermal:constantan_ingot',
        2,
        400
    )

    alloy([
        { "tag": 'forge:ingots/steel', "count": 2 },
        { "tag": 'forge:ingots/black_bronze', "count": 1 },
        { "tag": 'forge:ingots/nickel', "count": 1 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/weak_steel', "count": 1 }],
        'tfc:metal/ingot/weak_steel',
        5,
        800
    )

    alloy([
        { "tag": 'forge:ingots/steel', "count": 2 },
        { "tag": 'forge:ingots/black_bronze', "count": 1 },
        { "item": 'tfc:powder/garnierite', "count": 18 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/weak_steel', "count": 1 }],
        'tfc:metal/ingot/weak_steel',
        5,
        800
    )

    alloy([
        { "tag": 'forge:ingots/weak_steel', "count": 1 },
        { "tag": 'forge:ingots/pig_iron', "count": 1 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/black_steel', "count": 1 }],
        'tfc:metal/ingot/black_steel',
        3,
        900
    )
    alloy([
        { "tag": 'forge:ingots/weak_steel', "count": 1 },
        { "tag": 'forge:ingots/steel', "count": 1 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/black_steel', "count": 1 }],
        'tfc:metal/ingot/black_steel',
        3,
        900
    )

    alloy([
        { "tag": 'forge:ingots/black_steel', "count": 2 },
        { "tag": 'forge:ingots/steel', "count": 1 },
        { "tag": 'forge:ingots/bismuth_bronze', "count": 1 },
        { "tag": 'forge:ingots/sterling_silver', "count": 1 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/weak_blue_steel', "count": 1 }],
        'tfc:metal/ingot/weak_blue_steel',
        5,
        1000
    )

    alloy([
        { "tag": 'forge:ingots/black_steel', "count": 2 },
        { "tag": 'forge:ingots/steel', "count": 1 },
        { "tag": 'forge:ingots/rose_gold', "count": 1 },
        { "tag": 'forge:ingots/brass', "count": 1 },
        { "item": 'tfc:powder/flux', "count": 1 },
        { "tag": 'forge:ingots/weak_red_steel', "count": 1 }],
        'tfc:metal/ingot/weak_red_steel',
        5,
        1000
    )


    function alloy(inputs, output, count, tick) {
        event.custom({
            "type": "palmon:processing",
            "category": "misc",
            "focus_stat": "DEFENCE",
            "min_level": 30,
            "required_type": "steel",
            "base_hp": 0,
            "base_atk": 0,
            "base_def": 40,
            "base_spa": 0,
            "base_spd": 0,
            "base_spe": 0,
            "area_blocks": [
                {
                    "tag": "tfc:anvils"
                },
                {
                    "tag": "forge:magma_block"
                }
            ],
            "block_count": 1,
            "input_items": inputs,
            "input_power": 0,
            "input_fluid": {
                "fluid": "minecraft:water",
                "amount": 500
            },
            "tick": tick,
            "result_items": [
                {
                    "item": output,
                    "count": count
                }
            ]
        }).id('kubejs:production_alloy_' + i)

        event.custom({
            "type": "palmon:processing",
            "category": "misc",
            "focus_stat": "DEFENCE",
            "min_level": 25,
            "required_type": "steel",
            "base_hp": 0,
            "base_atk": 0,
            "base_def": 40,
            "base_spa": 0,
            "base_spd": 0,
            "base_spe": 0,
            "area_blocks": [
                {
                    "item": 'cataclysm:mechanical_fusion_anvil'
                },
                {
                    "tag": "forge:magma_block"
                },
                {
                    "item": 'embers:dawnstone_anvil'
                }
            ],
            "block_count": 1,
            "input_items": inputs,
            "input_power": 0,
            "input_fluid": {
                "fluid": "minecraft:water",
                "amount": 250
            },
            "tick": tick - 150,
            "result_items": [
                {
                    "item": output,
                    "count": count + 1
                }
            ]
        }).id('kubejs:production_alloy_sp_' + i)
        i += 1
    }
})