//priority: 0

onEvent('recipes', e => {

  removeRecipeByOutput(e, [
    PRE("dm_furnace"),
    PRE("rm_furnace"),
    IFC("million_furnace"),
  ])

	//dm
	e.recipes.extendedcrafting.shaped_table(PRE("dm_furnace"), furnaceTemplates.ultimate, {
		A: PREXP('magnum_star_drei'), // 1.6 bil
		B: Item.of('extendedcrafting:singularity', { Id:"extendedcrafting:shadow_steel" }),
		C: KJ('4m_component_wafer'),
		D: IFC("netherite_furnace"),
		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("dm_furnace"))


  //rm
  e.custom({
    input: [
			{ item: SS('red_nether_star') },
			{ item: PRE("dm_furnace") },
			{ 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: PRE("rm_furnace"),
      count: 1
    },
    type: IF("dissolution_chamber")
  }).id(KJ("rm_furnace"))


  //Infinity Furnace
  e.recipes.extendedcrafting.shaped_table(IFC("million_furnace"), furnaceTemplates.million, {
    A: PRE('rm_furnace'),
    B: PREXP('fading_matter'),
    C: IFC('rainbow_coal'),
    D: EC('the_ultimate_ingot'),
    E: AV('infinity_ingot'),
    F: AV('infinity_catalyst'),
    G: EC('ultimate_singularity'),
  }).id(KJ(`${IFC()}/million_furnace`))
})