//priority: 0

onEvent('recipes', e => {

    removeRecipeByOutput(e, [
      SE("griefer_shield"),
      SE("paragon_shield"),
      PREXT("dark_matter_shield"),
      PREXT("red_matter_shield"),
      CC("bulwark_of_the_flame"),
    ])

  //paragon
  e.recipes.create.mechanical_crafting(SE("paragon_shield"), shieldTemplates.advanced, {
		A: Item.of(SE('netherite_shield')).ignoreNBT(),
		B: MU("diamond_opinium_core"),
    C: PRE('klein_star_sphere'), // 6.25 mil
		D: AE2('singularity'),
		E: CC('monstrous_horn'),
	}).id(KJ("mechanical_crafting/paragon_shield"))
  e.recipes.extendedcrafting.shaped_table(SE("paragon_shield"), shieldTemplates.advanced, {
		A: Item.of(SE('netherite_shield')).ignoreNBT(),
		B: MU("diamond_opinium_core"),
    C: PRE('klein_star_sphere'), // 6.25 mil
		D: AE2('singularity'),
		E: CC('monstrous_horn'),
	}).id(KJ("extended_crafting/paragon_shield"))

  //griefer
  e.recipes.extendedcrafting.shaped_table(SE("griefer_shield"), shieldTemplates.ultimate, {
		A: PREXP('magnum_star_zwei'), //400.64 mil
		B: CM('star_infused_netherite_ingot'),
		C: MU('nether_star_opinium_core'),
		D: Item.of(SE('paragon_shield')).ignoreNBT(),
		E: KJ('computation_matrix'),
		F: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:refined_radiance" }),
		G: KJ('64k_component_wafer'),
	}).id(KJ("griefer_shield"))

	//dm
	e.recipes.extendedcrafting.shaped_table(PREXT("dark_matter_shield"), shieldTemplates.ultimate, {
    A: PREXP('magnum_star_drei'), // 1.6 bil
		B: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:shadow_steel" }),
		C: KJ('4m_component_wafer'),
		D: Item.of(SE('griefer_shield')).ignoreNBT(),
		E: PRE('dark_matter_block'),
		F: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:dark_matter" }),
		G: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:antimatter_relay_mk2" }),
	}).id(KJ("dark_matter_shield"))


    //rm
    e.custom({
      input: [
        { item: SS('red_nether_star') },
        { item: PREXT("dark_matter_shield") },
        { item: SS('red_nether_star') },
        { item: PRE("red_matter_block") },
        { item: PRE("red_matter_block") },
        { item: PREXP("dark_power_flower") },
        { item: PREXP("magnum_star_drei") }, //1.6 bil
        { item: PREXP("dark_power_flower") }
      ],
      inputFluid: "{FluidName:\"boss_tools:oil\",Amount:8000}",
      processingTime: 400,
      output: {
        item: PREXT("red_matter_shield"),
        count: 1
      },
      type: IF("dissolution_chamber")
    })


    //bulwark of the flame
    e.recipes.extendedcrafting.shaped_table(CC("bulwark_of_the_flame"), shieldTemplates.ultimate, {
      A: PREXP('magnum_star_sphere'), // ~20 bil
      B: F('#storage_blocks/refined_glowstone'),
      C: F('#storage_blocks/refined_obsidian'),
      D: PREXT("red_matter_shield"),
      E: CC('ignitium_block'),
      F: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:energy_collector_mk3" }),
      G: F("#dusts/lithium"),
    }).id(KJ("bulwark_of_the_flame"))
})