// priority: 0

onEvent('recipes', e => {
  //removals
  removeRecipeByOutput(e, [
		FN("flux_configurator"),
    FN("flux_core"),
    FN("flux_point"),
    FN("flux_plug"),
  ])
	removeRecipeByID(e, [
    FN("fluxcontroller"),
		FN("basicfluxstorage"),
		FN("herculeanfluxstorage"),
		FN("gargantuanfluxstorage"),
	])

	//configurator
	e.smithing(FN("flux_configurator"), Item.of(MAT('wrench')).ignoreNBT(), FN('flux_core'))

  //flux core
  e.shaped(FN("flux_core"), [
		'ABA',
		'BCB',
		'ABA',
	], {
		A: FN("flux_dust"),
		B: CP("obsidian_2"),
		C: M("reprocessed_fissile_fragment"),
	}).id(KJ("flux_core"))

  //flux point
  e.shaped(FN("flux_point"), [
		' A ',
		'ABA',
		' A ',
	], {
		A: FN("flux_core"),
		B: M("qio_exporter"),
	}).id(KJ("flux_point"))

  //flux plug
  e.shaped(FN("flux_plug"), [
		' A ',
		'ABA',
		' A ',
	], {
		A: FN("flux_core"),
		B: M("qio_importer"),
	}).id(KJ("flux_plug"))

  e.recipes.extendedcrafting.shaped_table(FN("flux_controller"), [
		'CCCCACCCC',
		'DGGGGGGGD',
		'DGFFFFFGD',
		'DGFEEEFGD',
		'AGFEBEFGA',
		'DGFEEEFGD',
		'DGFFFFFGD',
		'DGGGGGGGD',
		'CCCCACCCC',
	], {
		A: PREXP('magnum_star_omega'),
		B: Item.of('extendedcrafting:singularity', {Id:"extendedcrafting:orange_matter"}),
		C: FN('flux_block'),
		D: M('hdpe_stick'),
		E: AV('neutronium_block'),
		F: M('pellet_antimatter'),
		G: FN('flux_core'),
	}).id(KJ(`flux_controller`))

  e.recipes.extendedcrafting.shaped_table(FN("basic_flux_storage"), [
		'CCCACACCC',
		'DGGGGGGGD',
		'DGFFFFFGD',
		'AGFEEEFGA',
		'DGFEBEFGD',
		'AGFEEEFGA',
		'DGFFFFFGD',
		'DGGGGGGGD',
		'CCCACACCC',
	], {
		A: M('ultimate_induction_provider'),
		B: Item.of('extendedcrafting:singularity', {Id:"extendedcrafting:magnum_star_omega"}),
		C: FN('flux_block'),
		D: M('hdpe_stick'),
		E: M('ultimate_induction_cell'),
		F: M('pellet_antimatter'),
		G: FN('flux_core'),
	}).id(KJ(`basic_flux_storage`))

  e.recipes.extendedcrafting.shaped_table(FN("herculean_flux_storage"), [
		'CCCCCCCCC',
		'DGGGGGGGD',
		'DGFFFFFGD',
		'DGFEEEFGD',
		'DGFEBEFGD',
		'DGFEEEFGD',
		'DGFFFFFGD',
		'DGGGGGGGD',
		'CCCCCCCCC',
	], {
		B: Item.of('extendedcrafting:singularity', {Id:"extendedcrafting:magnum_star_omega"}),
		C: FN('flux_block'),
		D: M('hdpe_stick'),
		E: FN("basic_flux_storage"),
		F: M('pellet_antimatter'),
		G: FN('flux_core'),
	}).id(KJ(`herculean_flux_storage`))

  e.recipes.extendedcrafting.shaped_table(FN("gargantuan_flux_storage"), [
		'CCCCCCCCC',
		'DGGGGGGGD',
		'DGFFFFFGD',
		'DGFEEEFGD',
		'DGFEBEFGD',
		'DGFEEEFGD',
		'DGFFFFFGD',
		'DGGGGGGGD',
		'CCCCCCCCC',
	], {
		B: Item.of('extendedcrafting:singularity', {Id:"extendedcrafting:magnum_star_omega"}),
		C: FN('flux_block'),
		D: M('hdpe_stick'),
		E: FN("herculean_flux_storage"),
		F: M('pellet_antimatter'),
		G: FN('flux_core'),
	}).id(KJ(`gargantuan_flux_storage`))
})
