// priority: 0

onEvent('recipes', e => {
  //removals
  removeRecipeByID(e, [
    MU("solar_panel"),
    MU("solar_panel_controller"),
    MU("lunar_panel"),
    MU("ender_tile"),
    MU("chorus_tile"),
    MU("stone_drum"),
    MU("iron_drum"),
    MU("reinforced_large_drum"),
    MU("netherite_reinforced_drum"),
    MU("unstable_drum"),
    MU("quantum_quarry"),
    MU("golden_lasso"),
    MU("speed_upgrade"),
    MU("laser_hub"),
    MU("laser_port"),
    MU("unstable_ingot"),
    MU("chorus_opinium_core"),
    MU("experience_opinium_core"),
    MU("nether_star_opinium_core"),
    MU("the_final_opinium_core"),
  ])

  //tools & armors
  const fromNetherite = [
    {
      input: Item.of(TC("sword")).ignoreNBT(),
      output: MU("etheric_sword"),
    },
    {
      input: MC("netherite_hoe"),
      output: MU("reversing_hoe"),
    },
    {
      input: Item.of(TC("hand_axe")).ignoreNBT(),
      output: MU("healing_axe"),
    },
    {
      input: MC("netherite_shovel"),
      output: MU("erosion_shovel"),
    },
    {
      input: MC("shears"),
      output: MU("precision_shears"),
    },
    {
      input: Item.of(TC("pickaxe")).ignoreNBT(),
      output: MU("destruction_pickaxe"),
    },
    {
      input: Item.of(CA("material_armor_helmet")).ignoreNBT(),
      output: MU("unstable_helmet"),
    },
    {
      input: Item.of(CA("material_armor_chestplate")).ignoreNBT(),
      output: MU("unstable_chestplate"),
    },
    {
      input: Item.of(CA("material_armor_leggings")).ignoreNBT(),
      output: MU("unstable_leggings"),
    },
    {
      input: Item.of(CA("material_armor_boots")).ignoreNBT(),
      output: MU("unstable_boots"),
    },
  ]
  fromNetherite.forEach(obj => {
    const { input, output } = obj

    e.remove({ id: output })
    e.smithing(Item.of(output), input, Item.of(MU("unstable_ingot")).ignoreNBT())
  })

  //energy acceptor
  e.replaceInput({ id: MU("iron_opinium_core") }, MC("coal"), F("#gems/coke"))

  //angel ring: dragon ring
  e.replaceInput({ id: MU("ender_dragon_angel_ring") }, MC("black_dye"), F("#scales/dragon_scale"))

  //unstable ingot
  e.shaped(MU("unstable_ingot"), [
		'AAA',
		'BBB',
		'CCC'
	], {
		A: EC("crystaltine_ingot"),
		B: PREXP("basic_collector"),
		C: AV("crystal_matrix_ingot"),
	})

  //opinium cores
  e.shaped(MU("chorus_opinium_core"), [
		'ABA',
		'BCB',
		'ABA'
	], {
		A: MC("chorus_flower"),
		B: MU("emerald_opinium_core"),
		C: AE2("singularity"),
	})

  e.shaped(MU("experience_opinium_core"), [
		'ABA',
		'BCB',
		'ABA'
	], {
		A: MU("experience_pearl_3x"),
		B: MU("chorus_opinium_core"),
		C: AV("crystal_matrix_ingot"),
	})

  e.shaped(MU("nether_star_opinium_core"), [
		'ABA',
		'BCB',
		'ABA'
	], {
		A: MC("nether_star"),
		B: MU("experience_opinium_core"),
    C: EC("crystaltine_ingot"),
	})

  e.shaped(MU("the_final_opinium_core"), [
		'ABA',
		'BCB',
		'ABA'
	], {
		A: CR("refined_radiance"),
		B: MU("nether_star_opinium_core"),
    C: Item.of(MU("unstable_ingot")).ignoreNBT(),
	})

})
