ServerEvents.recipes(event => {

	//frames
	event.shaped('kubejs:half_frame_top', [
		'ABA',
		'A A',
		'   '
	], {A: 'immersiveengineering:light_engineering',B: 'actuallyadditions:enori_crystal'})
	event.shaped('kubejs:half_frame_bottom', [
		'   ',
		'A A',
		'ABA'
	], { A: 'immersiveengineering:heavy_engineering', B: 'actuallyadditions:void_crystal' })
	event.remove({ output: 'thermal:machine_frame' })
	event.custom({
		"type": "create:item_application",
		"ingredients": [
			{ "item": "kubejs:half_frame_bottom" },
			{ "item": "kubejs:half_frame_top" }],
		"results": [
			{ "item": "thermal:machine_frame" }]
	})

	//main
	event.recipes.createFilling('immersiveengineering:fiberboard', [
		'#minecraft:planks',
		Fluid.of('immersiveengineering:phenolic_resin', 100)
	])

	event.remove({ output: 'create:sturdy_sheet' })
	event.recipes.create.compacting('create:sturdy_sheet', ['immersiveengineering:plate_steel', 'thermal:lead_plate']).heated()

	event.remove({ output: 'actuallyadditions:atomic_reconstructor' })
	event.shaped(
		'actuallyadditions:atomic_reconstructor',
		[
			'ABA',
			'CDC',
			'AEA'
		], {
		A: 'minecraft:iron_ingot',
		B: 'immersiveengineering:heavy_engineering',
		C: 'thermal:rf_coil',
		D: 'create:railway_casing',
		E: 'botania:lens_speed'
	})

	event.remove({ id: 'immersiveengineering:refinery/resin' })
	event.custom({
		"type": "immersiveengineering:refinery",
		"catalyst": { "tag": "forge:plates/silver" },
		"energy": 240,
		"input0": { "amount": 8, "tag": "forge:ethanol" },
		"input1": { "amount": 8, "tag": "forge:creosote" },
		"result": { "amount": 8, "fluid": "immersiveengineering:phenolic_resin" }
	})
	event.remove({ id: 'immersiveengineering:bottling/duroplast_plate' })
	event.recipes.thermal.chiller('immersiveengineering:plate_duroplast', [
		Fluid.of('immersiveengineering:phenolic_resin', 250),
		'immersiveengineering:mold_plate'
	])

	event.recipes.thermal.pulverizer('immersiveengineering:dust_hop_graphite', 'immersiveengineering:ingot_hop_graphite')
	event.recipes.thermal.pulverizer('ae2:certus_quartz_dust', '#ae2:all_certus_quartz')
	event.recipes.thermal.pulverizer('ae2:fluix_dust', 'ae2:fluix_crystal')
	event.recipes.thermal.pulverizer('ae2:sky_dust', 'ae2:sky_stone_block')

	event.remove({ output: 'ae2:controller' })
	event.shaped('ae2:controller', [
		'ABA',
		'CDE',
		'FGH'
	], {
		A: 'immersiveengineering:component_electronic_adv',
		B: 'ae2:engineering_processor',
		C: 'actuallyadditions:empowered_diamatine_crystal',
		D: 'thermal:machine_frame',
		E: 'actuallyadditions:empowered_restonia_crystal',
		F: 'ae2:formation_core',
		G: 'actuallyadditions:empowered_void_crystal',
		H: 'ae2:annihilation_core'
	})

	let pressing = (output, die, input, count) => {
		event.custom({
			"type": "thermal:press",
			"ingredients": [
				{
					"item": input,
					"count": count
				},
				{
					"item": die
				}
			],
			"result": [
				{
					"item": output
				}
			],
			"energy": 800
		})
	}

	event.remove({ output: 'immersiveengineering:graphite_electrode' })
	event.remove({ output: 'immersiveengineering:ingot_hop_graphite' })
	event.remove({ output: 'immersiveengineering:dust_hop_graphite' })
	event.remove({ output: 'ae2:fluix_pearl' })
	pressing("immersiveengineering:ingot_hop_graphite", "thermal:chiller_ingot_cast", "immersiveengineering:dust_coke", 8)
	pressing("immersiveengineering:graphite_electrode", "thermal:chiller_rod_cast", "immersiveengineering:dust_hop_graphite", 4)
	pressing("ae2:fluix_pearl", "thermal:chiller_ball_cast", "ae2:fluix_dust", 3)

	event.recipes.thermal.centrifuge([
		Item.of('enderio:confusing_powder').withChance(0.10)
	],
		'kubejs:carpet_dust')


	event.remove({ id: 'immersiveengineering:alloysmelter/brass' })

	event.replaceInput({ mod: 'actuallyadditions' }, 'actuallyadditions:wood_casing', 'create:brass_casing')
	event.replaceInput({ mod: 'actuallyadditions' }, 'actuallyadditions:iron_casing', 'create:railway_casing')
	event.replaceInput({ mod: 'actuallyadditions' }, 'actuallyadditions:ender_casing', 'create:railway_casing')

	event.remove({ output: 'thermal:tar' })
	event.shapeless('9x thermal:tar', ['thermal:tar_block'])
	event.remove({ output: 'thermal:bitumen' })
	event.custom({
		"type": "thermal:pyrolyzer",
		"ingredient": {
			"item": "thermal:bitumen"
		},
		"result": [
			{
				"item": "thermal:tar"
			},
			{
				"item": "minecraft:coal",
				"chance": 0.25
			},
			{
				"fluid": "immersiveengineering:creosote",
				"amount": 250
			}
		],
		"experience": 0.15
	})

	event.custom({
		"type": "thermal:pyrolyzer",
		"ingredient": {
			"item": "kubejs:sculked_sculk_scrubber"
		},
		"result": [
			{
				"item": "kubejs:sculk_scrubber"
			},
			{
				"item": "minecraft:echo_shard"
			},
			{
				"item": "minecraft:echo_shard"
			},
			{
				"fluid": "enderio:dew_of_the_void",
				"amount": 250
			}
		],
		"experience": 0.15
	})

	event.custom({
		"type": "thermal:refinery",
		"ingredient": {
			"fluid": "thermal:crude_oil",
			"amount": 500
		},
		"result": [
			{
				"fluid": "thermal:heavy_oil",
				"amount": 20
			},
			{
				"fluid": "thermal:light_oil",
				"amount": 30
			},
			{
				"item": "thermal:bitumen"
			}
		],
		"energy": 1000
	})

	event.custom({
		"type": "thermal:refinery",
		"ingredient": {
			"fluid": "thermal:heavy_oil",
			"amount": 500
		},
		"result": [
			{
				"fluid": "thermal:light_oil",
				"amount": 250
			}
		],
		"energy": 1000
	})



})