// Scripts related to dark, red and prisma crystal processing

ServerEvents.tags('fluid', event => {
	
// Tags for raw crystal catalyst
event.add('kubejs:raw_dark_crystal_catalyst', 'kubejs:raw_dark_crystal_catalyst')
event.add('kubejs:raw_red_crystal_catalyst', 'kubejs:raw_red_crystal_catalyst')
event.add('kubejs:raw_prism_crystal_catalyst', 'kubejs:raw_prism_crystal_catalyst')
	
})

ServerEvents.recipes(event => {

// Renewable Magebloom Seeds
event.shapeless(
  Item.of('2x ars_nouveau:magebloom_crop'),
  [
    'ars_nouveau:magebloom',
	'ars_nouveau:magebloom'
  ]
)

// Growth Catalysts
event.recipes.create.mixing([Fluid.of(('kubejs:raw_dark_crystal_catalyst'), 2000), 'kubejs:emc_dark_matter'], ['kubejs:emc_dark_matter', Fluid.of(('thermal:ender'), 1000), Fluid.of(('immersiveengineering:creosote'), 1000)]).heated()

event.recipes.create.mixing([Fluid.of(('kubejs:raw_red_crystal_catalyst'), 2000), 'kubejs:emc_red_matter'], ['kubejs:emc_red_matter', Fluid.of(('mekanism:brine'), 1000), Fluid.of(('immersiveengineering:biodiesel'), 1000)]).heated()

event.recipes.create.mixing([Fluid.of(('kubejs:raw_prism_crystal_catalyst'), 2000), 'kubejs:prismatter'], ['kubejs:prismatter', Fluid.of(('mekanismgenerators:fusion_fuel'), 1000), Fluid.of(('thermal_extra:diesel'), 1000)]).heated()

// Distilled Growth Catalyst
event.recipes.create.mixing([Fluid.of(('kubejs:dark_crystal_catalyst'), 1000)], ['kubejs:darkdust', Fluid.of(('kubejs:raw_dark_crystal_catalyst'), 1000)]).superheated()
event.recipes.create.mixing([Fluid.of(('kubejs:red_crystal_catalyst'), 1000)], ['kubejs:reddust', Fluid.of(('kubejs:raw_red_crystal_catalyst'), 1000)]).superheated()
event.recipes.create.mixing([Fluid.of(('kubejs:prism_crystal_catalyst'), 1000)], ['kubejs:prisma_dust', Fluid.of(('kubejs:raw_prism_crystal_catalyst'), 1000)]).superheated()

// Dark Seeds
event.recipes.create.mixing(['kubejs:darkseed'], ['#forge:gems/source', '#kubejs:dark_matter', Fluid.of(('thermal_extra:crystallized_sunflower_oil'), 1000)]).heated()

// Red Seeds
event.recipes.create.mixing(['kubejs:redseed'], ['#forge:gems/fluix', '#kubejs:red_matter', Fluid.of(('thermal_extra:refined_sunflower_oil'), 1000)]).heated()

// Prism Seeds
event.recipes.create.mixing(['kubejs:prismseed'], ['mekanism:alloy_atomic', '#kubejs:prismatter', 'kubejs:darksplinter', 'kubejs:redsplinter', Fluid.of(('thermal_extra:flux_infused_oil'), 1000)]).heated()

// Step 1: raw crystal catalyst
event.recipes.create.filling('kubejs:darkt2', [Fluid.of(('kubejs:raw_dark_crystal_catalyst'), 250), 'kubejs:darkseed'])
event.recipes.create.filling('kubejs:redt2', [Fluid.of(('kubejs:raw_red_crystal_catalyst'), 250), 'kubejs:redseed'])
event.recipes.create.filling('kubejs:prismt2', [Fluid.of(('kubejs:raw_prism_crystal_catalyst'), 250), 'kubejs:prismseed'])

// Step 2: distilled crystal catalyst
event.recipes.create.filling('kubejs:darkt3', [Fluid.of(('kubejs:dark_crystal_catalyst'), 250), 'kubejs:darkt2'])
event.recipes.create.filling('kubejs:redt3', [Fluid.of(('kubejs:red_crystal_catalyst'), 250), 'kubejs:redt2'])
event.recipes.create.filling('kubejs:prismt3', [Fluid.of(('kubejs:prism_crystal_catalyst'), 250), 'kubejs:prismt2'])

// Step 3: more distilled catalyst
event.recipes.create.filling('kubejs:darkcrystal', [Fluid.of(('kubejs:dark_crystal_catalyst'), 500), 'kubejs:darkt3'])
event.recipes.create.filling('kubejs:redcrystal', [Fluid.of(('kubejs:red_crystal_catalyst'), 500), 'kubejs:redt3'])
event.recipes.create.filling('kubejs:prismcrystal', [Fluid.of(('kubejs:prism_crystal_catalyst'), 500), 'kubejs:prismt3'])

// Crushing recipes
event.recipes.create.crushing(['kubejs:darkdust', Item.of('kubejs:darkdust').withChance(0.5)], 'kubejs:darkt2')
event.recipes.create.crushing(['2x kubejs:darkdust', Item.of('kubejs:darkdust').withChance(0.5)], 'kubejs:darkt3')
event.recipes.create.crushing(['2x kubejs:darksplinter', Item.of('3x kubejs:darkdust')], 'kubejs:darkcrystal')

event.recipes.create.crushing(['kubejs:reddust', Item.of('kubejs:reddust').withChance(0.5)], 'kubejs:redt2')
event.recipes.create.crushing(['2x kubejs:reddust', Item.of('kubejs:reddust').withChance(0.5)], 'kubejs:redt3')
event.recipes.create.crushing(['2x kubejs:redsplinter', Item.of('3x kubejs:reddust')], 'kubejs:redcrystal')

event.recipes.create.crushing(['kubejs:prismatter', 'kubejs:prisma_dust', Item.of('kubejs:prisma_dust').withChance(0.5)], 'kubejs:prismt2')
event.recipes.create.crushing(['kubejs:prismatter', '2x kubejs:prisma_dust', Item.of('kubejs:prisma_dust').withChance(0.5)], 'kubejs:prismt3')
event.recipes.create.crushing(['kubejs:prismatter', Item.of('4x kubejs:prisma_dust'), Item.of('2x kubejs:prismsplinter')], 'kubejs:prismcrystal')

})