ServerEvents.recipes(event => {

  event.remove({ type: 'immersiveengineering:arc_furnace' })

  event.remove({ id: 'mekanism:processing/steel/enriched_iron_to_dust' })
  event.remove({ id: 'enderio:alloy_smelting/dark_steel_ingot' })


// Arc Furnace

  let itemVatArcFurnace4 = (output, outputCount, Input, Additive1, Additive2, Additive3) => {
    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "allowedVatTypes": [
        "tfmg:firebrick_lined_vat"
      ],
      "ingredients": [
        {
          "item": Input
        },
        {
          "item": Additive1
        },
        {
          "item": Additive2
        },
        {
          "item": Additive3
        }
      ],
      "machines": [
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode"
      ],
      "minSize": 9,
      "processingTime": 60,
      "results": [
        {
          "count": outputCount,
          "item": output
        },
        {
          "amount": 288,
          "fluid": 'tfmg:molten_slag'
        }

      ]
    })
  }
  let itemVatArcFurnace3 = (output, outputCount, Input, Additive1, Additive2) => {
    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "allowedVatTypes": [
        "tfmg:firebrick_lined_vat"
      ],
      "ingredients": [
        {
          "item": Input
        },
        {
          "item": Additive1
        },
        {
          "item": Additive2
        }
      ],
      "machines": [
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode"
      ],
      "minSize": 9,
      "processingTime": 60,
      "results": [
        {
          "count": outputCount,
          "item": output
        },
        {
          "amount": 288,
          "fluid": 'tfmg:molten_slag'
        }

      ]
    })
  }
  let fluidVatArcFurnace3 = (output, outputAmount, Input, Additive1, Additive2) => {
    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "allowedVatTypes": [
        "tfmg:firebrick_lined_vat"
      ],
      "ingredients": [
        {
          "item": Input
        },
        {
          "item": Additive1
        },
        {
          "item": Additive2
        }
      ],
      "machines": [
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode"
      ],
      "minSize": 9,
      "processingTime": 60,
      "results": [
        {
          "amount": outputAmount,
          "fluid": output
        },
        {
          "amount": 288,
          "fluid": 'tfmg:molten_slag'
        }

      ]
    })
  }
  let fluidVatArcFurnace = (output, outputAmount, Input) => {
    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "allowedVatTypes": [
        "tfmg:firebrick_lined_vat"
      ],
      "ingredients": [
        {
          "item": Input
        }
      ],
      "machines": [
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode"
      ],
      "minSize": 9,
      "processingTime": 60,
      "results": [
        {
          "amount": outputAmount,
          "fluid": output
        }

      ]
    })
  }

    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "allowedVatTypes": [
        "tfmg:firebrick_lined_vat"
      ],
      "ingredients": [
        {
          "item": 'ae2:certus_quartz_dust'
        }
      ],
      "machines": [
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode",
        "tfmg:graphite_electrode"
      ],
      "minSize": 9,
      "processingTime": 60,
      "results": [
        {
          "amount": 60,
          "fluid": 'tfmg:liquid_silicon'
        }

      ]
    })

  itemVatArcFurnace3(
    'enderio:dark_steel_ingot',
    1,
    'tfmg:steel_ingot',
    'create:shadow_steel',
    'create:powdered_obsidian'
  )

  event.remove({ output: 'enderio:confusing_powder' })
  itemVatArcFurnace4(
    'kubejs:reality_alloy',
    3,
    'botania:terrasteel_nugget',
    'enderio:confusing_powder',
    'tfmg:lead_ingot',
    'actuallyadditions:empowered_enori_crystal'
  )

  // Centrifuge

    let centrifugeItem = (Output, outputCount, outputChance, Byproduct, byproductCount, byproductChance, Input, inputCount) => {
    event.custom({
      "type": "tfmg:vat_machine_recipe",
      "heatRequirement": "heated",
      "ingredients": [
        {
          "count": inputCount,
          "item": Input
        }
      ],
      "machines": [
        "tfmg:centrifuge"
      ],
      "processingTime": 60,
      "results": [
        {
          "chance": outputChance,
          "count": outputCount,
          "item": Output
        },
        {
          "chance": byproductChance,
          "count": byproductCount,
          "item": Byproduct
        }

      ]
    })
  }

  centrifugeItem('kubejs:graphite_dust', 1, 0.70, 'tfmg:slag', 1, 0.90, 'tfmg:coal_coke_dust', 1)

  itemVatArcFurnace3(
    'enderio:dark_steel_ingot',
    1,
    'tfmg:steel_ingot',
    'create:shadow_steel',
    'create:powdered_obsidian'
  )

  event.custom({
  "type": "tfmg:vat_machine_recipe",
  "allowedVatTypes": [
    "tfmg:steel_vat",
    "tfmg:cast_iron_vat",
    "tfmg:firebrick_lined_vat"
  ],
  "ingredients": [
    {
      "amount": 1000,
      "fluid": "minecraft:water",
      "nbt": {}
    }
  ],
  "machines": [
    "tfmg:centrifuge"
  ],
  "minSize": 1,
  "processingTime": 10,
  "results": [
    {
      "amount": 1,
      "fluid": "minecraft:lava"
    }
  ]
})
})