// priority: 0

onEvent('recipes', e => {
  //removals
  removeRecipeByID(e, [
    BT("water_pump"),
    BT("hammer"),
    BT("compressor"),
    BT("blast_furnace"),
    BT("solar_panel"),
    BT("coal_generator"),
    BT("fuel_refinery"),
  ])

  //energy acceptor
  e.replaceInput({ id: AE2("network/blocks/energy_energy_acceptor") }, AE2("#crystals/fluix"), AE2("#crystals/certus"))



  //sky stone
  e.shaped(AE2('sky_stone_block'), ['AA ', 'AA '], {
    A: ENS('pebble_blackstone'),
  }).id(KJ(`${AE2()}/sky_stone_from_pebble`))

  //compressed metals
  e.recipes.createPressing(EE("steel_plate"), F("#ingots/steel"))
  e.recipes.createPressing(BT("desh_plate"), F("#ingots/desh"))

  const metals = [
    { metal: "steel", ingot: EE("steel_plate") },
    { metal: "desh", ingot: BT("desh_plate") },
    { metal: "silicon", ingot: BT("silicon_ingot") },
  ]
  metals.forEach(metalObj => {
    const { metal, ingot } = metalObj
    e.remove({ output: BT(`compressed_${metal}`) })
  
    let tMetal = KJ(`incomplete_${metal}_plate`)
    e.recipes.createSequencedAssembly([
      BT(`compressed_${metal}`),
    ], ingot, [
      e.recipes.createPressing(tMetal, tMetal)
    ]).transitionalItem(tMetal)
      .loops(16)
      .id(KJ(`compressed_${metal}`))
  })

})
