ServerEvents.recipes(event => {
	
	event.remove({ output: 'actuallyadditions:lens_of_the_miner' })
	event.remove({ output: 'actuallyadditions:drill_upgrade_three_by_three' })
	event.remove({ output: 'actuallyadditions:drill_upgrade_five_by_five' })
	event.replaceInput({ id: 'actuallyadditions:advanced_coil' }, 'minecraft:gold_nugget', '#forge:nuggets/electrum')
	event.replaceInput({ id: 'actuallyadditions:laser_relay_item_advanced' }, 'actuallyadditions:black_quartz', 'actuallyadditions:empowered_emeradic_crystal')
	event.replaceInput({ id: 'actuallyadditions:laser_relay_advanced' }, 'actuallyadditions:enori_crystal', 'actuallyadditions:empowered_enori_crystal')
	event.replaceInput({ id: 'actuallyadditions:laser_relay_advanced' }, 'actuallyadditions:restonia_crystal', 'actuallyadditions:empowered_restonia_crystal')
	
	event.remove({output: 'mekanism:basic_energy_cube'})
	event.custom({
  		"type": "mekanism:mek_data",
  		"key": {
    		"A": {"item": "actuallyadditions:restonia_crystal"},
    		"E": {"item": "mekanism:energy_tablet"},
			"I": {"tag": "forge:ingots/iron"},
    		"P": {"item": "mekanism:steel_casing"}
  		},
  		"pattern": [
    		"AEA",
    		"IPI",
    		"AEA"
  		],
  		"result": {
    		"item": "mekanism:basic_energy_cube"
  		}
	})

	event.remove({output: 'actuallyadditions:empowerer'})
	event.shaped('actuallyadditions:empowerer', [
		'DFD',
		'CEC',
		'ABA'
		],{
		A: 'thermal:charge_bench',
		B: 'kubejs:half_frame_bottom',
		C: 'immersiveengineering:component_electronic',
		D: 'kubejs:soul_fuse',
		E: 'immersiveengineering:coil_mv',
		F: 'actuallyadditions:diamatine_crystal'
	})

	event.remove({output: 'actuallyadditions:display_stand'})
	event.shaped('actuallyadditions:display_stand', [
		'DFD',
		'CEC',
		'ABA'
		],{
		A: 'actuallyadditions:restonia_crystal',
		B: 'kubejs:half_frame_bottom',
		C: 'immersiveengineering:component_electronic',
		D: 'kubejs:soul_fuse',
		E: 'immersiveengineering:coil_mv',
		F: 'create:display_link'
	})

	event.remove({output: 'actuallyadditions:basic_coil'})
	event.shaped('actuallyadditions:basic_coil', [
		'R',
		'B',
		'R'
		],{
		B: 'actuallyadditions:black_quartz',
		R: 'actuallyadditions:restonia_crystal'
	})
	event.remove({output: 'actuallyadditions:laser_relay'})
	event.shaped('actuallyadditions:laser_relay', [
		'RCR',
		'OBO'
		],{
		O: 'create:railway_casing',
		B: '#forge:storage_blocks/redstone',
		C: 'actuallyadditions:advanced_coil',
		R: 'actuallyadditions:restonia_crystal'
	})
	event.remove({ output: 'actuallyadditions:laser_relay_item' })
	event.shaped('actuallyadditions:laser_relay_item', [
		'RCR',
		'OBO'
		],{
		O: 'create:railway_casing',
		B: '#forge:storage_blocks/redstone',
		C: 'actuallyadditions:advanced_coil',
		R: 'actuallyadditions:emeradic_crystal'
	})
	event.remove({ output: 'actuallyadditions:laser_relay_fluids' })
	event.shaped('actuallyadditions:laser_relay_fluids', [
		'RCR',
		'OBO'
		],{
		O: 'create:railway_casing',
		B: '#forge:storage_blocks/redstone',
		C: 'actuallyadditions:advanced_coil',
		R: 'actuallyadditions:palis_crystal'
	})
	event.remove({output: 'actuallyadditions:laser_relay_extreme'})
	event.shaped('actuallyadditions:laser_relay_extreme', [
		'RRR',
		'DLD',
		'SSS'
		],{
		L: 'actuallyadditions:laser_relay_advanced',
		S: 'create:shadow_steel',
		D: 'actuallyadditions:empowered_diamatine_crystal',
		R: 'actuallyadditions:empowered_restonia_crystal'
	})

  	event.remove({ id: `actuallyadditions:empowering/diamatine_block` })
  	event.remove({ id: `actuallyadditions:empowering/enori_block` })
  	event.remove({ id: `actuallyadditions:empowering/restonia_block` })
  	event.remove({ id: `actuallyadditions:empowering/palis_block` })
  	event.remove({ id: `actuallyadditions:empowering/emeradic_block` })
  	event.remove({ id: `actuallyadditions:empowering/void_block` })

	let empowering = (output, Input, Input1, Input2, Input3, Input4, time, energy, colour) => {
    event.custom({
		"type": "actuallyadditions:empowering",
		"base": {
		  "item": Input
		},
		"color": colour,
		"energy": energy,
		"modifiers": [
		  {
			"item": Input1
		  },
		  {
			"item": Input2
		  },
		  {
			"item": Input3
		  },
		  {
			"item": Input4
		  }
		],
		"result": {
		  "item": output
		},
		"time": time
	  })
	}

	event.remove({output: 'actuallyadditions:empowered_void_crystal'})
	empowering(
		'actuallyadditions:empowered_void_crystal',
		'actuallyadditions:void_crystal',

		'thermal:tar',
		'thermal:tar',
		'thermal:tar', 
		'thermal:tar',
		50, 5000, 0
	)

	event.remove({output: 'enderio:infinity_rod'})
	empowering(
		'enderio:infinity_rod',
		'immersiveengineering:stick_steel',

		'eidolon:ender_calx',
		'enderio:confusing_powder', 
		'enderio:grains_of_infinity',
		'enderio:confusing_powder',
		2000, 10000, 10365735
	)

	event.remove({ output: 'enderio:photovoltaic_composite' })
	event.shapeless('enderio:photovoltaic_composite', ['#forge:silicon', '#forge:dusts/lapis', 'enderio:confusing_powder'])
	empowering(
		'kubejs:reality_charge',
		'kubejs:reality_charge_empty',

		'enderio:photovoltaic_composite',
		'enderio:photovoltaic_composite', 
		'enderio:photovoltaic_composite',
		'enderio:photovoltaic_composite',
		2000, 100000, 5439613
	)

	//Atomic Reconstructor
  	event.remove({ id: `actuallyadditions:laser/crystalize_diamatine_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/crystalize_enori_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/crystalize_restonia_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/crystalize_palis_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/crystalize_emeradic_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/crystalize_void_crystal_block` })
  	event.remove({ id: `actuallyadditions:laser/ethetic_white_block` })
  	event.remove({ id: `actuallyadditions:laser/ethetic_green_block` })
  	event.remove({ id: `actuallyadditions:laser/soul_sand` })

	let AtomicLaser = (output, input, energy) => {
		let outputPath = output.split(':')[1]
  		event.remove({ id: `actuallyadditions:laser/crystalize_${outputPath}` })
		event.custom({
  		"type": "actuallyadditions:laser",
  		"energy": energy,
  		"ingredient": {
    		"item": input
  		},
  		"result": {
    		"item": output
  		}
		})
	}
	AtomicLaser("minecraft:red_sand", "minecraft:sand", 5000)
	AtomicLaser("minecraft:soul_sand", "minecraft:red_sand", 280000)
	AtomicLaser("actuallyadditions:diamatine_crystal", "minecraft:diamond", 100000)
	AtomicLaser("actuallyadditions:emeradic_crystal", "minecraft:emerald", 80000)
	AtomicLaser("actuallyadditions:palis_crystal", "minecraft:lapis_lazuli", 70000)
	AtomicLaser("actuallyadditions:restonia_crystal", "minecraft:redstone", 60000)
	AtomicLaser("actuallyadditions:enori_crystal", "minecraft:iron_ingot", 50000)
	AtomicLaser("actuallyadditions:void_crystal", "actuallyadditions:black_quartz", 10000)
	AtomicLaser("actuallyadditions:ethetic_white_block", "minecraft:quartz_block", 5000)
	AtomicLaser("actuallyadditions:ethetic_green_block", "minecraft:chiseled_quartz_block", 6000)

})