ServerEvents.recipes(event => {
	event.remove({output: 'tfmg:cable_tube'})
	event.remove({output: 'tcintegrations:bronze_block'})
	event.remove({output: 'tfmg:fireproof_brick'})
	event.remove({output: 'tfmg:diagonal_cable_block'})
	event.remove({output: 'tfmg:pumpjack_hammer_head'})
	event.remove({output: 'alloyed:steel_casing'})
	event.remove({output: 'tfmg:limesand'})
	event.remove({output: 'tfmg:turbine_blade'})
	event.remove({output: 'tfmg:blasting_mixture'})
	event.remove({output: 'tfmg:generator'})
	event.remove({output: 'tfmg:coke_oven'})
	event.remove({output: 'tfmg:spark_plug'})
	event.remove({output: 'tfmg:plastic_smart_fluid_pipe'})
	event.remove({output: 'tfmg:aluminum_smart_fluid_pipe'})
	event.remove({output: 'tfmg:steel_smart_fluid_pipe'})
  	event.replaceInput(
	{ input: 'tfmg:synthetic_leather' },
	'tfmg:synthetic_leather',            // Arg 2: the item to replace
	'#forge:leather'         // Arg 3: the item to replace it with
  )
	event.shaped(
  Item.of('tfmg:pumpjack_hammer_head', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: '#forge:plates/steel',
    B: '#forge:storage_blocks/steel',
  })
	event.shaped(
  Item.of('tfmg:diagonal_cable_block', 4), // arg 1: output
  [
    'AB ',
    'BC ', // arg 2: the shape (array of strings)
    '   '
  ],
  {
    A: 'tfmg:copper_cable',
    B: '#forge:ingots/steel',
	C: '#forge:leather',
  })
	event.shaped(
  Item.of('tfmg:turbine_blade', 1), // arg 1: output
  [
    ' B ',
    'BAB', // arg 2: the shape (array of strings)
    ' B '
  ],
  {
    A: 'tfmg:rebar',
    B: 'tfmg:aluminum_ingot'
  })
	event.shaped(
  Item.of('tfmg:cable_tube', 4), // arg 1: output
  [
    'BAB',
    ' C ', // arg 2: the shape (array of strings)
    '   '
  ],
  {
    A: 'tfmg:copper_cable',
    B: '#forge:ingots/steel',
	C: '#forge:leather',
  })
	event.shaped(
  Item.of('tfmg:plastic_smart_fluid_pipe', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' C '
  ],
  {
    A: '#forge:plates/gold',
    B: 'tfmg:plastic_pipe',
	C: 'create:electron_tube'
  })
	event.shaped(
  Item.of('tfmg:aluminum_smart_fluid_pipe', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' C '
  ],
  {
    A: '#forge:plates/gold',
    B: 'tfmg:aluminum_pipe',
	C: 'create:electron_tube'
  })
	event.shaped(
  Item.of('tfmg:steel_smart_fluid_pipe', 1), // arg 1: output
  [
    ' A ',
    ' B ', // arg 2: the shape (array of strings)
    ' C '
  ],
  {
    A: 'mekanism:hdpe_sheet',
    B: 'tfmg:steel_pipe',
	C: 'create:electron_tube'
  })
	event.shaped(
  Item.of('tfmg:fireclay', 1), // arg 1: output
  [
    'AA ',
    'AA ', // arg 2: the shape (array of strings)
    '   '
  ],
  {
	A: 'tfmg:fireclay_ball'
  })
	let inter = "tfmg:unfinished_steel_mechanism"; // making a variable to store the transitional item makes the code more readable
    event.recipes.create
        .sequenced_assembly(
            [
                Item.of("tfmg:steel_mechanism").withChance(82.0), // this is the item that will appear in JEI as the result
                Item.of("tfmg:steel_ingot").withChance(8.0),
				Item.of("tfmg:aluminum_ingot").withChance(5.0),
				Item.of("tfmg:heavy_plate").withChance(5.0),
            ],
            "#forge:ingots/steel",
            [
                // the transitional item is a variable, that is 'kubejs:incomplete_bauxite' and is used during the intermediate stages of the assembly
                event.recipes.createDeploying(inter, [inter, '#forge:ingots/steel']),
				event.recipes.createDeploying(inter, [inter, 'tfmg:aluminum_ingot']),
				event.recipes.createDeploying(inter, [inter, 'tfmg:screw']),
				event.recipes.createDeploying(inter, [inter, 'tfmg:screwdriver']),
            ]
        )
        .transitionalItem(inter)
        .loops(1); // set the transitional item and the number of loops
	event.recipes.create.pressing([
		'tfmg:limesand'
	], 	'create:limestone')
  	event.recipes.create.mixing(
  	'tfmg:blasting_mixture',
  	['tfmg:limesand', 'mekanism:enriched_iron'])
  	event.recipes.create.compacting(
  	'tfmg:fossilstone',
  	['3x tfmg:bitumen', Fluid.of("minecraft:water", 500), Fluid.of("garnished:cashew_mixture", 250)]).heated()
  	//event.recipes.create.compacting(
  	//'2x create_henry:coal_piece',
  	//'#forge:stripped_wood').heated()
	event.recipes.mekanism.smelting(
	'tfmg:fireproof_brick',
	'tfmg:fireclay_ball')
	event.shapeless(
  Item.of('tfmg:nickel_ingot', 1), // arg 1: output
	[
		'9x v_borne:nickel_nugget'
	])
	event.shapeless(
  Item.of('v_borne:nickel_nugget', 9), // arg 1: output
	[
		'tfmg:nickel_ingot'
	])
	event.shapeless(
  Item.of('tfmg:steel_block', 1), // arg 1: output
	[
		'9x tfmg:steel_ingot'
	])
	event.shapeless(
  Item.of('v_borne:nickel_coin', 4), // arg 1: output})
	[
		'v_borne:nickel_coinstack'
	])
	event.shapeless(
  Item.of('v_borne:nickel_coinstack', 1), // arg 1: output
	[
		'4x v_borne:nickel_coin'
	])
	event.shapeless(
  Item.of('tfmg:coke_oven', 3), // arg 1: output
	[
		'#forge:ingots/cast_iron',
		'create:industrial_iron_block',
		'create:andesite_bars'
	])
	event.recipes.create.mechanical_crafting('tfmg:spark_plug', [
    'A',
    'B',
	'C'
  ], {
	A: 'v_borne:flint_dust',
	B: 'tfmg:aluminum_ingot',
	C: 'tfmg:rebar'
  })
	event.recipes.create.pressing(
	'v_borne:nickel_coin',
	'v_borne:nickel_nugget')
	event.recipes.create.compacting(
	'mekanism:block_bronze',
	'9x alloyed:bronze_ingot')
	event.recipes.tfmg.casting(Fluid.of("createbigcannons:molten_cast_iron", 144), ["tfmg:cast_iron_ingot", "tfmg:cast_iron_block"], 300)
	event.recipes.tfmg.casting(Fluid.of("tfmg:molten_steel", 144), ["tfmg:steel_ingot", "tfmg:steel_block"], 300)
	event.recipes.tfmg.casting(Fluid.of("v_borne:molten_bronze", 111), ["mekanism:ingot_bronze", "mekanism:block_bronze"], 300)
    event.recipes.tfmg.industrial_blasting('mekanism:dust_bronze', [Fluid.of("v_borne:molten_bronze", 111), Fluid.of("tfmg:molten_slag", 75)], 300)
    event.recipes.tfmg.industrial_blasting("v_borne:compact_gravel", [Fluid.of("tfmg:molten_slag", 888), Fluid.of("minecraft:lava", 75)], 1200)
    event.recipes.tfmg.polarizing("mekanism:ingot_uranium", "luckytntmod:uranium_ingot", 400)
	event.recipes.tfmg.vat_machine_recipe([Fluid.of("minecraft:water", 500), Fluid.of("mekanism:sodium", 500)], [Fluid.of("v_borne:naoh_solution")])
    .allowedVatTypes("tfmg:steel_vat", "tfmg:cast_iron_vat")
    .machines("tfmg:mixing")
    .processingTime(600)
	event.recipes.tfmg.vat_machine_recipe(["tfmg:silicon_ingot", Fluid.of("mekanism:chlorine")], [Fluid.of("v_borne:sicl")])
    .superheated()
    .allowedVatTypes("tfmg:fireproof_chemical_vat")
    .machines("tfmg:mixing")
    .processingTime(600)
	event.recipes.tfmg.vat_machine_recipe([Fluid.of("createaddition:bioethanol"), Fluid.of("v_borne:sicl")], [Fluid.of("v_borne:impure_teos")])
    .allowedVatTypes("tfmg:steel_vat")
    .machines("tfmg:mixing")
    .processingTime(300)
	event.recipes.tfmg.distillation("v_borne:impure_teos", ['v_borne:teos'])
	event.recipes.tfmg.vat_machine_recipe([Fluid.of("createaddition:bioethanol"), Fluid.of("v_borne:teos"), Fluid.of('v_borne:naoh_solution')], [Fluid.of("v_borne:presol")])
    .allowedVatTypes("tfmg:steel_vat")
    .machines("tfmg:mixing")
    .processingTime(600)
	event.recipes.tfmg.vat_machine_recipe([Fluid.of("v_borne:presol")], [Fluid.of("v_borne:silica_sol")])
    .allowedVatTypes('tfmg:steel_vat')
    .machines('tfmg:electrode')
    .processingTime(600)
	event.recipes.tfmg.casting(Fluid.of("v_borne:silica_sol", 144), ["v_borne:uncured_aerogel"], 300)
	event.recipes.create.haunting(
	'v_borne:aerogel',
	'v_borne:uncured_aerogel')
})