ServerEvents.recipes(event => {
    event.remove({ id: 'create:pressing/compat/immersiveengineering/plate_steel' })
    event.remove({ id: 'immersiveengineering:metalpress/plate_steel' })
    event.remove({ id: 'immersiveengineering:cokeoven/coke_block' })
    event.remove({ id: 'immersiveengineering:jei_bucket_creosote' })
    event.remove({ id: 'create:filling/compat/immersiveengineering/treated_wood_in_spout' })
    event.remove({ id: 'tfmg:industrial_blasting/silicon' })
    event.remove({ id: 'tfmg:coking/coal' })
    event.remove({ id: 'immersiveengineering:crafting/treated_wood_horizontal' })
    event.remove({ id: 'tfmg:compacting/cast_iron' })
    event.remove({ id: 'tfmg:crafting/kinetics/accumulator' })
    event.remove({ id: 'immersiveengineering:crusher/sandstone' })
    event.remove({ id: 'immersiveengineering:crusher/red_sandstone' })


    event.remove({ output: 'thermal:bitumen' })
    event.remove({ output: 'immersiveengineering:dust_saltpeter' })
    event.remove({ output: 'thermal:tar' })
    event.remove({ output: 'thermal:creosote_bucket' })
    event.remove({ output: 'ae2:chest' })
    event.remove({ output: 'ae2:silicon' })
    event.remove({ output: 'tfmg:copper_spool' })
    event.remove({ output: 'tfmg:aluminum_spool' })
    event.remove({ output: 'tfmg:constantan_spool' })
    event.remove({ output: 'tfmg:pumpjack_crank' })
    event.remove({ output: 'tfmg:pumpjack_base' })
    event.remove({ output: 'createadditions:alternator' })

    event.replaceInput(
        { input: 'ae2:silicon' },
        'ae2:silicon',
        'tfmg:silicon_ingot'
    )
    event.replaceInput(
        { input: '#forge:silicon' },
        '#forge:silicon',
        'tfmg:silicon_ingot'
    )

    event.replaceInput(
        { input: 'thermal:sulfur_dust' },
        'thermal:sulfur_dust',
        'tfmg:sulfur_dust'
    )
    event.replaceOutput(
        { output: 'thermal:sulfur_dust' },
        'thermal:sulfur_dust',
        'tfmg:sulfur_dust'
    )

    event.replaceInput(
        { id: 'tfmg:crafting/kinetics/industrial_mixer' },
        'tfmg:steel_mechanism',
        'create:mechanical_mixer'
    )

    event.replaceInput(
        { id: 'tfmg:crafting/kinetics/steel_distillation_controller' },
        'tfmg:steel_mechanism',
        'immersiveengineering:component_electronic'
    )
    event.replaceInput(
        { input: 'immersiveengineering:dust_saltpeter' },
        'immersiveengineering:dust_saltpeter',
        'tfmg:nitrate_dust'
    )
    event.replaceOutput(
        { output: 'immersiveengineering:dust_saltpeter' },
        'immersiveengineering:dust_saltpeter',
        'tfmg:nitrate_dust'
    )

    event.replaceInput(
        { input: 'ae2:silicon' },
        'ae2:silicon',
        'tfmg:silicon_ingot'
    )

    event.replaceInput(
        { input: 'immersiveengineering:stick_steel' },
        'immersiveengineering:stick_steel',
        'tfmg:rebar'
    )
    event.replaceOutput(
        { output: 'immersiveengineering:stick_steel' },
        'immersiveengineering:stick_steel',
        'tfmg:rebar'
    )

    event.replaceOutput(
        { id: 'thermal:machines/pyrolyzer/pyrolyzer_logs' },
        Fluid.of('thermal:creosote'),
        Fluid.of('tfmg:creosote')
    )
	event.remove({output: 'dustrial_decor:cast_iron_billet'})
	event.remove({input: 'dustrial_decor:cast_iron_billet'})
    event.replaceInput(
        { id: 'immersiveengineering:crafting/blastbrick_reinforced' },
        'immersiveengineering:blastbrick',
        'tfmg:fireproof_bricks'

    )
    event.replaceInput(
        { id: 'createaddition:compat/immersiveengineering/item_application/reinforced_blast_brick' },
        'immersiveengineering:blastbrick',
        'tfmg:fireproof_bricks'

    )
    event.replaceInput(
        { id: 'createaddition:compat/immersiveengineering/item_application/reinforced_blast_brick_using_deployer' },
        'immersiveengineering:blastbrick',
        'tfmg:fireproof_bricks'

    )
    event.remove({output: 'tfmg:stator'})
    event.recipes.create.mechanical_crafting(Item.of('tfmg:stator', 4), [
        'AB  ',
        'CAB ',
        'CDAB',
        'ECCA'
    ], {
        A: 'tfmg:electromagnetic_coil',
        B: 'tfmg:magnet',
        C: '#forge:plates/aluminum',
        D: '#forge:storage_blocks/steel',
        E: '#forge:wires/copper'
    })

    event.shaped('tfmg:accumulator', [
        'A',
    ], {
        A: 'tfmg:accumulator'
    })
    event.shaped('tfmg:pumpjack_crank', [
        'A A',
        'BCB',
        'DED'
    ], {
        A: 'tfmg:synthetic_string',
        B: 'tfmg:heavy_plate',
        C: 'tfmg:steel_mechanism',
        D: 'tfmg:rebar',
        E: 'tfmg:heavy_machinery_casing'
    })
    event.shaped('kubejs:ironclad_propeller', [
        ' A ',
        'ABA',
        ' A '
    ], {
        A: 'minecraft:iron_ingot',
        B: 'create:propeller'
    })
    event.shaped('ae2:chest', [
        'ABA',
        'CDC',
        'EFE'
    ], {
        A: '#forge:glass',
        B: 'ae2:terminal',
        C: 'ae2:fluix_glass_cable',
        D: 'immersiveengineering:light_engineering',
        E: 'tfmg:steel_ingot',
        F: 'tfmg:lithium_ingot'
    })
    event.shaped('tfmg:pumpjack_base', [
        'ABA',
        'CDC',
        'EFE'
    ], {
        A: 'tfmg:synthetic_string',
        B: 'tfmg:steel_fluid_tank',
        C: 'tfmg:steel_mechanism',
        D: 'tfmg:heavy_machinery_casing',
        E: 'tfmg:steel_pipe',
        F: 'tfmg:industrial_pipe'
    })
    event.shaped(Item.of('immersiveengineering:electromagnet', '{BlockEntityTag:{energy:32000}}'), [
        'ABA',
        'CCC',
        'ADA'
    ], {
        A: 'tfmg:rebar',
        B: 'immersiveengineering:component_electronic',
        C: 'kubejs:lithium_battery',
        D: Item.of('tfmg:copper_spool', '{Amount:1000}'),
    })
    event.recipes.createMixing(Item.of('minecraft:lapis_lazuli', 5), [
        Fluid.of('minecraft:water', 1000),
        'minecraft:blue_dye',
        'tfmg:sulfur_dust'
    ]).heated()

    event.recipes.create.compacting(['tfmg:cast_iron_ingot'], ['minecraft:iron_ingot', 'minecraft:charcoal']).lowheated()
    event.recipes.create.filling('immersiveengineering:treated_wood_horizontal', [
        'tfmg:hardened_planks',
        Fluid.of('tfmg:creosote', 125)])

    function coiling(output, wireInput) {
        event.shaped(output, [
            'WWW',
            'WSW',
            'WWW'
        ], {
            S: 'tfmg:empty_spool',
            W: wireInput
        })
    }
    coiling(Item.of('tfmg:copper_spool', '{Amount:1000}'), 'tfmg:copper_wire')
    coiling(Item.of('tfmg:aluminum_spool', '{Amount:1000}'), 'tfmg:aluminum_wire')
    coiling(Item.of('tfmg:constantan_spool', '{Amount:1000}'), 'tfmg:constantan_wire')

    event.custom({
        "type": "tfmg:winding",
        "ingredients": [
            {
                "item": "tfmg:empty_spool"
            },
            {
                "item": "tfmg:copper_spool"
            }
        ],
        "processingTime": 1000,
        "results": [
            {
                "item": "tfmg:copper_spool",
                "nbt": {
                    "Amount": 1000
                }
            }
        ]
    })
    event.custom({
        "type": "tfmg:winding",
        "ingredients": [
            {
                "item": "tfmg:empty_spool"
            },
            {
                "item": "tfmg:constantan_spool"
            }
        ],
        "processingTime": 1000,
        "results": [
            {
                "item": "tfmg:constantan_spool",
                "nbt": {
                    "Turns": 1000
                }
            }
        ]
    })
    event.custom({
        "type": "tfmg:winding",
        "ingredients": [
            {
                "item": "tfmg:empty_spool"
            },
            {
                "item": "tfmg:aluminum_spool"
            }
        ],
        "processingTime": 1000,
        "results": [
            {
                "item": "tfmg:aluminum_spool",
                "nbt": {
                    "Turns": 1000
                }
            }
        ]
    })
    event.custom(
        {
            "type": "tfmg:coking",
            "ingredients": [
                {
                    "item": "minecraft:charcoal"
                }
            ],
            "processingTime": 1200,
            "results": [
                {
                    "item": "tfmg:coal_coke"
                },
                {
                    "amount": 1,
                    "fluid": "tfmg:creosote"
                },
                {
                    "amount": 30,
                    "fluid": "tfmg:carbon_dioxide"
                }
            ]
        })

    event.custom(
        {
            "type": "tfmg:coking",
            "ingredients": [
                {
                    "item": "minecraft:charcoal"
                }
            ],
            "processingTime": 1200,
            "results": [
                {
                    "item": "tfmg:coal_coke"
                },
                {
                    "amount": 1,
                    "fluid": "tfmg:creosote"
                },
                {
                    "amount": 30,
                    "fluid": "tfmg:carbon_dioxide"
                }
            ]
        })

    event.custom(
        {
            "type": "tfmg:coking",
            "ingredients": [
                {
                    "item": "mekanism:block_charcoal"
                }
            ],
            "processingTime": 10800,
            "results": [
                {
                    "item": "tfmg:coal_coke_block"
                },
                {
                    "amount": 1,
                    "fluid": "tfmg:creosote"
                },
                {
                    "amount": 30,
                    "fluid": "tfmg:carbon_dioxide"
                }
            ]
        })

    event.custom(
        {
            "type": "tfmg:coking",
            "ingredients": [
                {
                    "tag": "mekanism:block_charcoal"
                }
            ],
            "processingTime": 1200,
            "results": [
                {
                    "item": "mekanism:block_charcoal"
                },
                {
                    "amount": 1,
                    "fluid": "tfmg:creosote"
                },
                {
                    "amount": 30,
                    "fluid": "tfmg:carbon_dioxide"
                }
            ]
        })

    event.custom(
        {
            "type": "tfmg:industrial_blasting",
            "hotAirUsage": 0,
            "ingredients": [
                {
                    "item": "ae2:certus_quartz_crystal"
                }
            ],
            "processingTime": 5,
            "results": [
                {
                    "amount": 40,
                    "fluid": "tfmg:liquid_silicon"
                }
            ]
        }
    )
    event.custom(
        {
            "type": "tfmg:industrial_blasting",
            "hotAirUsage": 0,
            "ingredients": [
                {
                    "item": "ae2:certus_quartz_dust"
                }
            ],
            "processingTime": 5,
            "results": [
                {
                    "amount": 40,
                    "fluid": "tfmg:liquid_silicon"
                }
            ]
        }
    )
    event.custom(
        {
            "type": "tfmg:industrial_blasting",
            "hotAirUsage": 20,
            "ingredients": [
                {
                    "item": "minecraft:iron_ingot"
                },
                {
                    "tag": "tfmg:flux"
                }
            ],
            "processingTime": 20,
            "results": [
                {
                    "amount": 144,
                    "fluid": "tfmg:molten_steel"
                },
                {
                    "amount": 144,
                    "fluid": "tfmg:molten_slag"
                },
                {
                    "amount": 200,
                    "fluid": "tfmg:furnace_gas"
                }
            ]
        }
    )
})