

ServerEvents.recipes(event => {

  
	event.remove({type:"minecraft:crafting_shapeless",mod:"thermal",output:"#forge:dusts"})
	event.remove({type:"minecraft:crafting_shapeless",mod:"thermal",output:"#forge:ingots",input:"minecraft:fire_charge"})

	event.remove({input:'immersiveengineering:hammer'})
	event.remove({mod:"immersiveengineering",output:"#forge:rods/all_metal"})
	
	event.remove({output:"#aether:accessories_gloves"})

	event.replaceInput({input:"minecraft:stick"},"minecraft:stick","#c:rods/wooden")
	event.replaceInput({input:"aether:skyroot_stick"},"aether:skyroot_stick","#c:rods/wooden")
	event.replaceInput({input:"#aether:skyroot_stick"},"#aether:skyroot_stick","#c:rods/wooden")
	event.replaceOutput({id:"vintageimprovements:craft/sulfur_nuggets_to_item"},"vintageimprovements:sulfur","thermal:sulfur")
	event.replaceInput({input:"minecraft:lever",mod:"sophisticatedstorage"},"minecraft:lever","minecraft:redstone_torch")
	
	event.stonecutting("farmersdelight:potato_crate","thermal:potato_block")
	event.stonecutting("farmersdelight:potato_crate","quark:potato_crate")

	event.stonecutting("thermal:potato_block","farmersdelight:potato_crate")
	event.stonecutting("thermal:potato_block","quark:potato_crate")

	event.stonecutting("quark:potato_crate","farmersdelight:potato_crate")
	event.stonecutting("quark:potato_crate","thermal:potato_block")

	event.stonecutting("quark:beetroot_crate","thermal:beetroot_block")
	event.stonecutting("quark:beetroot_crate","farmersdelight:beetroot_crate")

	event.stonecutting("thermal:beetroot_block","quark:beetroot_crate")
	event.stonecutting("thermal:beetroot_block","farmersdelight:beetroot_crate")

	event.stonecutting("farmersdelight:beetroot_crate","quark:beetroot_crate")
	event.stonecutting("farmersdelight:beetroot_crate","thermal:beetroot_block")

	event.stonecutting("quark:apple_crate","fruitsdelight:apple_crate")
	event.stonecutting("quark:apple_crate","thermal:apple_block")

	event.stonecutting("thermal:apple_block","fruitsdelight:apple_crate")
	event.stonecutting("thermal:apple_block","quark:apple_crate")

	event.stonecutting("fruitsdelight:apple_crate","quark:apple_crate")
	event.stonecutting("fruitsdelight:apple_crate","thermal:apple_block")

	event.stonecutting("quark:carrot_crate","farmersdelight:carrot_crate")
	event.stonecutting("quark:carrot_crate","thermal:carrot_block")

	event.stonecutting("thermal:carrot_block","farmersdelight:carrot_crate")
	event.stonecutting("thermal:carrot_block","quark:carrot_crate")

	event.stonecutting("farmersdelight:carrot_crate","quark:carrot_crate")
	event.stonecutting("farmersdelight:carrot_crate","thermal:carrot_block")

	event.stonecutting("quark:sugar_cane_block","thermal:sugar_cane_block")
	event.stonecutting("thermal:sugar_cane_block","quark:sugar_cane_block")

	
	event.remove({id:"quark:building/crafting/compressed/potato_crate"})
	event.remove({id:"quark:tweaks/crafting/utility/misc/easy_sticks"})
	event.remove({id:"thermal:storage/potato_block"})

	event.stonecutting("create:rose_quartz_block","create:rose_quartz_tiles")
	event.stonecutting("create:rose_quartz_block","create:small_rose_quartz_tiles")
	event.stonecutting("create:rose_quartz_tiles","create:rose_quartz_block")
	event.stonecutting("create:small_rose_quartz_tiles","create:rose_quartz_block")

	event.shaped("9x biomeswevegone:tall_allium",
		[
			"B",
			"B"
		],
		{
			B: "biomeswevegone:allium_petal_block"
		}
	)

	event.shaped("9x biomeswevegone:tall_white_allium",
		[
			"B",
			"B"
		],
		{
			B: "biomeswevegone:white_allium_petal_block"
		}
	)

	event.shaped("9x biomeswevegone:tall_pink_allium",
		[
			"B",
			"B"
		],
		{
			B: "biomeswevegone:pink_allium_petal_block"
		}
	)

	event.custom({
		"type": "patchouli:shapeless_book_recipe",
		"ingredients": [
			{
			"item": "book"
			},
			{
			"item": "minecraft:rotten_flesh"
			}
		],
		"book": "patchouli:druidic_beastiary"
	})

	event.shaped("aether:nature_staff",
		[
			"G",
			"S"
		],
		{
			S: "#c:rods/wooden",
			G: "aether:zanite_gemstone"
		}
	).id("aether:nature_staff")

	event.shaped("4x aether:ambrosium_torch",
		[
			"G",
			"S"
		],
		{
			S: "#c:rods/wooden",
			G: "aether:ambrosium_shard"
		}
	).id("aether:ambrosium_torch")

	event.shaped("4x aether:golden_dart",
		[
			"G",
			"S",
			"F"
		],
		{
			S: "#c:rods/wooden",
			G: "aether:golden_amber",
			F: "feather"
		}
	).id("aether:golden_dart")

	function Chunks(big,small)
	{
		event.shapeless(big,"8x "+small)
		event.shapeless("8x "+small,big)
		//Compacts 8 small items into 1 big item and back (coal chunks)
	};

	function StorageCompacting(big,small)
	{
		event.shapeless(big,"9x "+small)
		event.shapeless("9x "+small,big)
		//Compacts 9 small items into 1 big item and back (nuggets, ingots, storage blocks)
	};

	function SmallStorageCompacting(big,small)
	{
		event.shaped(big,["YY","YY"],{Y:small})
		event.shapeless("4x "+small,big)
		//Compacts 4 small items into 1 big item and back (used for some gems and gems blocks)
	};

	event.shapeless("immersiveengineering:storage_steel","9x immersiveengineering:ingot_steel").id("immersiveengineering:crafting/ingot_steel_to_storage_steel")
	
	event.shapeless("thermal:sulfur","9x #forge:nuggets/sulfur")
	Chunks("coal","kubejs:coal_chunk")
	Chunks("charcoal","kubejs:charcoal_chunk")
	Chunks("thermal:coal_coke","kubejs:coke_chunk")
	StorageCompacting("kubejs:gold_leaf_block","naturesaura:gold_leaf")
	StorageCompacting("kubejs:rotten_flesh_block","rotten_flesh")
	StorageCompacting("kubejs:ivy_block","immersive_weathering:ivy")
	StorageCompacting("kubejs:sturdy_deepslate","minecraft:deepslate")
	StorageCompacting("naturesaura:infused_iron","kubejs:infused_iron_nugget")
	StorageCompacting("kubejs:sapphire_block","kubejs:sapphire")
	StorageCompacting("thermal:gunpowder_block","quark:gunpowder_sack")
	StorageCompacting("kubejs:arcanum_alloy_block","kubejs:arcanum_alloy_ingot")
	StorageCompacting("kubejs:source_alloy_block","kubejs:source_alloy_ingot")
	StorageCompacting("kubejs:arcanum_alloy_ingot","kubejs:arcanum_alloy_nugget")
	StorageCompacting("kubejs:source_alloy_ingot","kubejs:source_alloy_nugget")
	StorageCompacting("twilightforest:ironwood_ingot","kubejs:ironwood_nugget")
	StorageCompacting("twilightforest:knightmetal_ingot","kubejs:knightmetal_nugget")
	StorageCompacting("naturesaura:tainted_gold","kubejs:tainted_gold_nugget")
	StorageCompacting("naturesaura:sky_ingot","kubejs:sky_nugget")
	StorageCompacting("naturesaura:depth_ingot","kubejs:depth_nugget")
	StorageCompacting('twilightforest:fiery_ingot','kubejs:fiery_nugget')
	StorageCompacting("create:andesite_alloy","kubejs:andesite_alloy_nugget")
	StorageCompacting("kubejs:storm_block","kubejs:storm_ingot")
	StorageCompacting("kubejs:storm_ingot","kubejs:storm_nugget")

	SmallStorageCompacting("thermal:ruby_block","thermal:ruby")
	SmallStorageCompacting("thermal:sapphire_block","thermal:sapphire")
	SmallStorageCompacting("deep_aether:squall_block","deep_aether:squall_plate")


	//============================= Dusts

	global.thermalMetals.forEach(id => {
		event.custom(
			{
			"type": "create:milling",
			"ingredients": [
			  {
				"tag": "forge:raw_materials/"+id
			  }
			],
			"results": [
			  {
				"item": "thermal:"+id+"_dust",
				"count": 1
			  }
			],
			"processingTime": 100
		  })/// Adds Dusts crafting recipes to the create machines
		
	});
	 
	function metal(material)
	{
		event.remove({id:'thermal:machines/press/press_'+material+'_ingot_to_coin'})
		event.remove({id:'thermal:machines/press/press_'+material+'_nugget_to_coin'}) /// Removes Coins crafting recipes

		event.custom(
			{
			"type": "create:milling",
			"ingredients": [
			  {
				"tag": "forge:ingots/"+material
			  }
			],
			"results": [
			  {
				"item": "thermal:"+material+"_dust",
				"count": 1
			  }
			],
			"processingTime": 100
		  })/// Adds Dusts crafting recipes to the create machines
	}
	//-------------------Keys---------------------

	event.recipes.create.milling('kubejs:infused_diamond','kubejs:broken_key')
	event.recipes.create.milling(['kubejs:broken_key',"2x kubejs:infused_diamond"],'kubejs:overworld_key')
	event.recipes.create.milling(['kubejs:broken_key',"2x thermal:sapphire"],'kubejs:twilight_key')
	event.recipes.create.milling(['kubejs:broken_key',"2x thermal:ruby"],'kubejs:nether_key')
	//-------------------Gears----------------------

	function CustomGears(material,id)
	{
		event.recipes.thermal.press(id,["4x #forge:ingots/"+material,"thermal:press_gear_die"])//Thermal Press Recipe

		event.shaped(id,
			[
				"RPR",
				"PGP",
				"RPR"
			],
			{
				P: "#forge:plates/"+material,
				R: "#forge:rods/"+material,
				G: "kubejs:stone_gear"
			}
		)// Crafting Table recipe

		event.custom({
			"type": "immersiveengineering:metal_press",
			"energy": 2400,
			"input": {
				"base_ingredient": {
				"tag": "forge:ingots/"+material
				},
				"count": 4
			},
			"mold": "immersiveengineering:mold_gear",
			"result": {
				"item": id
			}
		})// IE Press Recipe
	}

	function ThermalGears(material)
	{
		event.remove({id:"thermal:parts/"+material+"_gear"})//removes original recipe
		event.shaped("thermal:"+material+"_gear",
			[
				"RPR",
				"PGP",
				"RPR"
			],
			{
				P: "#forge:plates/"+material,
				R: "#forge:rods/"+material,
				G: "kubejs:stone_gear"
			}
		)// Adds crafting recipes for gears from thermal
	}

	ThermalGears("iron")
	ThermalGears("gold")
	ThermalGears("copper")
	ThermalGears("netherite")
	ThermalGears("tin")
	ThermalGears("lead")
	ThermalGears("silver")
	ThermalGears("bronze")
	ThermalGears("nickel")
	ThermalGears("steel")
	ThermalGears("rose_gold")
	ThermalGears("electrum")
	ThermalGears("invar")
	ThermalGears("constantan")
	ThermalGears("signalum")
	ThermalGears("lumium")
	ThermalGears("enderium")
	ThermalGears("diamond")
	CustomGears("infused_iron","kubejs:infused_iron_gear")
	CustomGears("source_alloy","kubejs:source_alloy_gear")
	CustomGears("arcanum_alloy","kubejs:arcanum_alloy_gear")
	CustomGears("aluminum","kubejs:aluminum_gear")
	CustomGears("andesite","kubejs:andesite_gear")
	CustomGears("zinc","kubejs:zinc_gear")
	CustomGears("uranium","kubejs:uranium_gear")
	CustomGears("stainless_steel","kubejs:stainless_steel_gear")
	CustomGears("ironwood","kubejs:ironwood_gear")
	CustomGears("knightmetal","kubejs:knightmetal_gear")
	CustomGears("arcane_gold","kubejs:arcane_gold_gear")
	//CustomGears("drenched_iron","kubejs:drenched_iron_gear")
	//CustomGears("swift_alloy","kubejs:swift_alloy_gear")
	CustomGears("tainted_gold","kubejs:tainted_gold_gear")
	CustomGears("sky","kubejs:sky_gear")
	CustomGears("depth","kubejs:depth_gear")
	CustomGears("brass","kubejs:brass_gear")
	//CustomGears("fireite","kubejs:fireite_gear")
	CustomGears("fiery","kubejs:fiery_gear")
	CustomGears("storm","kubejs:storm_gear")


	//-------------------Rods-----------------------

	function rods(material,output)
	{
		// Function that uses tag as an input and item id as an output
		// Adds shaped recipe, IE Recipe and Thermal Recipe
		event.shaped(output,
			[
				"  X",
				" X ",
				"X  "
			],
			{
				X: "#forge:plates/"+material
			})

		event.custom({
			type: "immersiveengineering:metal_press",
			energy: 2400,
			input: {"base_ingredient":{"tag":"forge:plates/"+material},"count":2},
			mold: "immersiveengineering:mold_rod",
			result: { item: output },
		});

		event.recipes.thermal.press(output,["#forge:plates/"+material,"immersiveengineering:mold_rod"])
		event.remove({output:output})
		event.remove({output:"#forge:rods/"+material})
	}

	rods("infused_iron","kubejs:infused_iron_rod")
	rods("source_alloy","kubejs:source_alloy_rod")
	rods("arcanum_alloy","kubejs:arcanum_alloy_rod")
	rods("copper","kubejs:copper_rod")
	rods("electrum","kubejs:electrum_rod")
	rods("diamond","kubejs:diamond_rod")
	rods("gold","kubejs:gold_rod")
	//rods("drenched_iron","kubejs:drenched_iron_rod")
	//rods("swift_alloy","kubejs:swift_alloy_rod")
	rods("tainted_gold","kubejs:tainted_gold_rod")
	rods("sky","kubejs:sky_rod")
	rods("depth","kubejs:depth_rod")
	rods("brass","kubejs:brass_rod")
	rods("arcane_gold","kubejs:arcane_gold_rod")
	//rods("fireite","kubejs:fireite_rod")

	event.remove({id:"vintageimprovements:craft/fiery_rod"})
	
	rods("fiery","kubejs:fiery_rod")
	rods("storm","kubejs:storm_rod")
	


	rods("iron","immersiveengineering:stick_iron")
	rods("stainless_steel","immersiveengineering:stick_steel")

	rods("aluminum",'vintageimprovements:aluminum_rod')
	rods("andesite","vintageimprovements:andesite_rod")
	rods("bronze","vintageimprovements:bronze_rod")
	rods("constantan","vintageimprovements:constantan_rod")
	rods("enderium","vintageimprovements:enderium_rod")
	rods("invar","vintageimprovements:invar_rod")
	rods("ironwood","vintageimprovements:ironwood_rod")
	rods("knightmetal","vintageimprovements:knightmetal_rod")
	rods("lead","vintageimprovements:lead_rod")
	rods("lumium","vintageimprovements:lumium_rod")
	rods("netherite","vintageimprovements:netherite_rod")
	rods("nickel","vintageimprovements:nickel_rod")
	rods("rose_gold","vintageimprovements:rose_gold_rod")
	rods("signalum","vintageimprovements:signalum_rod")
	rods("silver","vintageimprovements:silver_rod")
	rods("steel","vintageimprovements:steel_rod")
	rods("tin","vintageimprovements:tin_rod")

	rods("uranium","vintageimprovements:uranium_rod")
	rods("vanadium","vintageimprovements:vanadium_rod")
	rods("zinc","vintageimprovements:zinc_rod")
	
	//-------------------Plates---------------------

	
	function PlatesOnetoOne(outputItem, inputBlock)
	{
		event.recipes.create.pressing(`2x ${outputItem}`,`${inputBlock}`)// Adds Plates crafting recipes to the create machines
	
		event.recipes.thermal.press(`2x ${outputItem}`,`${inputBlock}`)// Adds Plates crafting recipes to the thermal machines
	
		event.recipes.immersiveengineering.metal_press(`2x ${outputItem}`,`${inputBlock}`,"immersiveengineering:mold_plate")// Adds Plates crafting recipes to the IE machines
	
		event.custom({
			type: "lychee:block_interacting",
			item_in: { item: "immersiveengineering:hammer" },
			block_in: inputBlock,
			post: [
				{ type: "drop_item", item: outputItem ,count: 1 },
				{ type: "place", block: "air" },
				{ type: "damage_item",damage: 0 }
			]
		});// Adds In World Plates crafting recipes 

		event.custom(
			{
				type: "lychee:block_crushing",
				"comment": "25% chance for extra drop!",
				post: [
				  {
					type: "anvil_damage_chance",
					"chance": 0
				  },
				  {
					type: "place",
					block: "minecraft:air",
				  },
				  {
					type: "drop_item",
					item: outputItem,
					count: 1
				  },
				  {
					type: "drop_item",
					"contextual": [
					  {
						type: "chance",
						"chance": 0.25
					  }
					],
					item: outputItem
				  }
				],
				"landing_block": inputBlock
			  }  
		)

		event.custom(
			{
				type: "lychee:block_crushing",
				post: [
				  {
					type: "anvil_damage_chance",
					"chance": 0
				  },
				  {
					type: "place",
					block: "minecraft:air",
				  },
				  {
					type: "drop_item",
					item: outputItem,
					count: 2
				  }
				],
				"falling_block": "kubejs:pressing_catalyst",
				"landing_block": inputBlock
			  }  
		)

		event.recipes.naturesaura.altar(Item.of(outputItem,2),inputBlock,500,100,"kubejs:pressing_catalyst")
	}

	PlatesOnetoOne("kubejs:wooden_plate", "immersiveengineering:treated_wood_horizontal")
	PlatesOnetoOne("kubejs:stone_plate", "minecraft:smooth_stone")

	function plates(inputItem, outputItem, inputBlock) {// Adds Plates crafting recipes to the machines
		
		event.recipes.create.pressing(Item.of(outputItem,6),inputBlock)// Adds Plates crafting recipes to the create machines
	
		event.recipes.thermal.press(outputItem,"#"+inputItem)// Adds Plates crafting recipes to the thermal machines
	
		event.custom({
			type: "immersiveengineering:metal_press",
			energy: 2400,
			input: { tag: inputItem },
			mold: "immersiveengineering:mold_plate",
			result: { item: outputItem },
		});// Adds Plates crafting recipes to the IE machines
	
		event.custom({
			type: "lychee:block_interacting",
			item_in: { item: "immersiveengineering:hammer" },
			block_in: inputBlock,
			post: [
				{ type: "drop_item", item: outputItem,count: 3 },
				{ type: "place", block: "air" },
				{ type: "damage_item",damage: 0 }
			]
		});// Adds In World Plates crafting recipes
		
		event.custom(
			{
				type: "lychee:block_crushing",
				post: [
				  {
					type: "anvil_damage_chance",
					"chance": 0
				  },
				  {
					type: "place",
					block: "minecraft:air",
				  },
				  {
					type: "drop_item",
					item: outputItem,
					count: 4
				  }
				],
				"landing_block": inputBlock
			  }  
		)// Adds in World Plates crafting recipes from falling anvil

		event.custom(
			{
				type: "lychee:block_crushing",
				post: [
				  {
					type: "anvil_damage_chance",
					"chance": 0
				  },
				  {
					type: "place",
					block: "minecraft:air",
				  },
				  {
					type: "drop_item",
					item: outputItem,
					count: 5
				  }
				],
				"falling_block": "kubejs:pressing_catalyst",
				"landing_block": inputBlock
			  }  
		)// Adds in World Plates crafting recipes from falling pressing catalyst

		event.recipes.naturesaura.altar(Item.of(outputItem,5),inputBlock,500,100,"kubejs:pressing_catalyst")
	}

	plates("forge:ingots/source_alloy","kubejs:source_alloy_plate","kubejs:source_alloy_block")
	plates("forge:ingots/infused_iron","kubejs:infused_iron_plate","naturesaura:infused_iron_block")
	plates("forge:ingots/arcanum_alloy","kubejs:arcanum_alloy_plate","kubejs:arcanum_alloy_block")
	plates("forge:gems/diamond","kubejs:diamond_plate","minecraft:diamond_block")
	
	plates("forge:ingots/ironwood","vintageimprovements:ironwood_sheet","twilightforest:ironwood_block")
	plates("forge:ingots/knightmetal","vintageimprovements:knightmetal_sheet","twilightforest:knightmetal_block")
	plates("forge:ingots/fiery","vintageimprovements:fiery_sheet","twilightforest:fiery_block")
	

	plates("forge:ingots/tin","vintageimprovements:tin_sheet","thermal:tin_block")
	plates("forge:ingots/silver","vintageimprovements:silver_sheet","thermal:silver_block")
	plates("forge:ingots/lead","vintageimprovements:lead_sheet","thermal:lead_block")
	plates("forge:ingots/nickel","vintageimprovements:nickel_sheet","thermal:nickel_block")
	plates("forge:ingots/bronze","vintageimprovements:bronze_sheet","thermal:bronze_block")

	plates("forge:ingots/uranium",'vintageimprovements:uranium_sheet','immersiveengineering:storage_uranium')
	plates("forge:ingots/stainless_steel",'immersiveengineering:plate_steel',"immersiveengineering:storage_steel")
	plates("forge:ingots/steel","thermal:steel_plate","thermal:steel_block")
	plates("forge:ingots/electrum","immersiveengineering:plate_electrum","thermal:electrum_block")
	plates("forge:ingots/arcane_gold","wizards_reborn:arcane_gold_sheet","wizards_reborn:arcane_gold_block")

	plates("forge:ingots/constantan",'vintageimprovements:constantan_sheet',"thermal:constantan_block")
	plates("forge:ingots/enderium",'vintageimprovements:enderium_sheet','thermal:enderium_block')
	plates("forge:ingots/invar",'vintageimprovements:invar_sheet',"thermal:invar_block")
	plates("forge:ingots/lumium",'vintageimprovements:lumium_sheet',"thermal:lumium_block")
	plates("forge:ingots/rose_gold",'vintageimprovements:rose_gold_sheet',"thermal:rose_gold_block")
	plates("forge:ingots/signalum",'vintageimprovements:signalum_sheet',"thermal:signalum_block")
	plates("forge:ingots/zinc",'vintageimprovements:zinc_sheet',"create:zinc_block")
	plates("forge:ingots/vanadium",'vintageimprovements:vanadium_sheet',"vintageimprovements:vanadium_block")

	plates("forge:ingots/aluminum",'vintageimprovements:aluminum_sheet',"immersiveengineering:storage_aluminum")
	plates("forge:ingots/andesite_alloy",'vintageimprovements:andesite_sheet','create:andesite_alloy_block')
	plates("forge:ingots/copper","create:copper_sheet","minecraft:copper_block")
	plates("forge:ingots/iron","create:iron_sheet","minecraft:iron_block")
	plates("forge:ingots/gold","create:golden_sheet","minecraft:gold_block")
	plates("forge:ingots/netherite","vintageimprovements:netherite_sheet","minecraft:netherite_block")
	plates("forge:ingots/brass","create:brass_sheet","create:brass_block")

	
	plates("forge:ingots/tainted_gold","kubejs:tainted_gold_sheet","naturesaura:tainted_gold_block")
	plates("forge:ingots/sky","kubejs:sky_sheet","naturesaura:sky_ingot_block")
	plates("forge:ingots/depth","kubejs:depth_sheet","naturesaura:depth_ingot_block")

	plates("forge:ingots/sarcon","wizards_reborn:sarcon_sheet","wizards_reborn:sarcon_block")
	plates("forge:ingots/vilenium","wizards_reborn:vilenium_sheet","wizards_reborn:vilenium_block")
	plates("forge:ingots/storm","kubejs:storm_sheet","kubejs:storm_block")
	


	//-------------------Coins---------------------
	event.shapeless('thermal:silver_coin', ['9x thermal:copper_coin'])
	event.shapeless('thermal:gold_coin', ['9x thermal:silver_coin'])
	event.shapeless('thermal:netherite_coin', ['9x thermal:gold_coin'])
	event.shapeless('thermal:enderium_coin', ['9x thermal:netherite_coin'])

	event.shapeless('9x thermal:copper_coin',['thermal:silver_coin'])
	event.shapeless('9x thermal:silver_coin',['thermal:gold_coin'])
	event.shapeless('9x thermal:gold_coin',['thermal:netherite_coin'])
	event.shapeless('9x thermal:netherite_coin',['thermal:enderium_coin'])
	
	metal('enderium')
	metal('steel')
	metal('invar')
	metal('bronze')
	metal('electrum')
	metal('constantan')
	metal('signalum')
	metal('lumium')
	event.remove({output:'thermal:press_coin_die'})

	
	///=======================================Building blocks=======================================///

	event.shaped("12x tinted_glass",
		[
			"LAL",
			"AGA",
			"LAL"
		],
		{
			L: "#forge:wires/lead",
			A: "#forge:gems/amethyst",
			G: "#forge:glass/colorless"
		}
	).id("immersiveengineering:crafting/tinted_glass_lead_wire")
	event.shaped("immersiveengineering:sawdust",
		[
			"SS"
		],
		{
			S: "#forge:dusts/wood"
		}
	).id("immersiveengineering:crafting/sawdust")

	event.recipes.thermal.rock_gen("create:limestone","air","create:honey",30)

	event.recipes.thermal.rock_gen("create:scoria","air","create:chocolate",30)

	/*event.recipes.thermal.rock_gen("minecraft:crying_obsidian","air","deep_aether:poison_fluid",30)
	/// Why doesnt it work :(
	event.recipes.thermal.rock_gen("deep_aether:aersmog","water","deep_aether:poison_fluid",30)*/

	event.shaped("8x immersiveengineering:slag_brick",
		[
			"GGG",
			"GXG",
			"GGG"
		],
		{
			G: "#forge:slag",
			X: "kubejs:brick_glue"
		}
	).damageIngredient("kubejs:brick_glue",8).id("immersiveengineering:crafting/slag_brick")

	event.shaped("2x kubejs:polished_planks",
		[
			"PX",
			"XP"
		],
		{
			P: "#minecraft:planks",
			X: "#forge:rods/wooden"
		}
	)
	event.shaped("2x kubejs:stacked_planks",
		[
			"PP",
			"PP"
		],
		{
			P: "#minecraft:wooden_slabs",
		}
	)

	event.shaped("kubejs:packed_planks",
		[
			"SPS",
			"PPP",
			"SPS"
		],
		{
			P: "#minecraft:planks",
			S: "#forge:rods/wooden"
		})
	

	event.remove({id:'supplementaries:timber_frame'})
	event.shaped(
		Item.of('4x supplementaries:timber_frame'), 
		[
		  'CCC', 
		  'C C',
		  'CCC',
		],
		{
		  C: 'stick'
		}
	  )

	wood_TF.forEach(type => {
		
		event.shaped("twilightforest:"+type+"_chest",
			[
				"XXX",
				"X X",
				"XXX"
			],
			{X:"twilightforest:"+type+"_planks"}
		).id("twilightforest:wood/"+type+"_chest")
	});

	

	event.shaped("supplementaries:item_shelf",
		[
			"S S",
			"PPP"
		],
		{S:"#forge:rods/wooden",P:"minecraft:planks"}
	).id("supplementaries:item_shelf")

	//Regions Unexplored
	//event.shapeless("regions_unexplored:blackstone_cluster","blackstone").id("regions_unexplored:blackstone_cluster")
	
	

	//event.shaped("architects_palette:hadaline_tiles",["XX","XX"],{"X":"architects_palette:hadaline_bricks"}).id("architects_palette:hadaline_tiles")

	//Regions Unexplored
	//event.shapeless("regions_unexplored:blackstone_cluster","blackstone").id("regions_unexplored:blackstone_cluster")

	//event.shapeless("twigs:polished_basalt_bricks","architects_palette:basalt_tiles").id("twigs:polished_basalt_bricks")
	//event.shapeless("architects_palette:basalt_tiles","twigs:polished_basalt_bricks")
	event.shapeless("twigs:mossy_bricks","immersive_weathering:mossy_bricks")
	
	event.shaped("8x twigs:gravel_bricks",
		[
			"GGG",
			"GXG",
			"GGG"
		],
		{
			G: "#forge:gravel",
			X: "kubejs:brick_glue"
		}
	).damageIngredient("kubejs:brick_glue",8).id("twigs:gravel_bricks")
	
	event.shapeless("quark:mossy_cobblestone_bricks","twigs:mossy_cobblestone_bricks").id("quark:building/crafting/mossy_cobblestone_bricks")

	//event.shaped("architects_palette:hadaline_tiles",["XX","XX"],{"X":"architects_palette:hadaline_bricks"}).id("architects_palette:hadaline_tiles")

	//Regions Unexplored
	//event.shapeless("regions_unexplored:mossy_stone","immersive_weathering:mossy_stone").id("regions_unexplored:mossy_stone")
	//event.shapeless("immersive_weathering:mossy_stone","regions_unexplored:mossy_stone")

	//event.shapeless("quark:dripstone_bricks","architects_palette:dripstone_bricks").id("architects_palette:dripstone_bricks")
	//event.shapeless("architects_palette:dripstone_bricks","quark:dripstone_bricks")

	//event.shapeless("quark:calcite_bricks","architects_palette:calcite_bricks").id("architects_palette:calcite_bricks")
	//event.shapeless("architects_palette:calcite_bricks","quark:calcite_bricks")

	event.shapeless("twigs:cobblestone_bricks","quark:cobblestone_bricks").id("twigs:cobblestone_bricks")
	event.shapeless("quark:cobblestone_bricks","twigs:cobblestone_bricks")
	event.shapeless("twigs:gravel_bricks","supplementaries:gravel_bricks")
	event.shapeless("supplementaries:gravel_bricks","twigs:gravel_bricks").id("supplementaries:gravel_bricks")

	event.remove({id:"twigs:azalea_flowers_from_flowering_azalea"})

	event.remove({id:"immersiveengineering:crafting/toolbox"})
	
	event.shapeless("minecraft:yellow_dye",["naturesaura:aura_bloom"])

	event.shapeless("irons_spellbooks:wizard_hat","irons_spellbooks:wizard_helmet").id("irons_spellbooks:wizard_helmet_hat")
	event.shapeless("irons_spellbooks:wizard_helmet","irons_spellbooks:wizard_hat")

	/* Regions Unexplored
	event.shapeless("4x regions_unexplored:blue_magnolia_flowers","4x regions_unexplored:blue_magnolia_leaves").id("regions_unexplored:blue_magnolia_flowers")
	event.shapeless("4x regions_unexplored:pink_magnolia_flowers","4x regions_unexplored:pink_magnolia_leaves").id("regions_unexplored:pink_magnolia_flowers")
	event.shapeless("4x regions_unexplored:white_magnolia_flowers","4x regions_unexplored:white_magnolia_leaves").id("regions_unexplored:white_magnolia_flowers")*/

	
	event.replaceInput({id:"immersiveengineering:crafting/wirecutter"},"#forge:rods/wooden","immersiveengineering:stick_treated")

	//============================= Shapeshifting Root

	function WaystoneVariants(type,block)
	{
		event.shapeless("waystones:"+type+"waystone",["#waystones:waystones",block])
	}
	WaystoneVariants("deepslate_","deepslate")
	WaystoneVariants("sandy_","sandstone")
	WaystoneVariants("","stone")
	WaystoneVariants("mossy_","moss_block")
	WaystoneVariants("end_stone_","end_stone")
	WaystoneVariants("blackstone_","blackstone")

	event.forEachRecipe({output:"#wizards_reborn:luminal_glass"}, r=>{
		
		let ingredients = r.originalRecipeIngredients

		//console.log("trapdoor ingredients:"+ingredients[0].itemIds[0])

		let output = r.originalRecipeResult
		
		event.shaped("8x "+output.id,
			[
				"GGG",
				"GXG",
				"GGG"
			],
			{
				G: ingredients[0].itemIds[0],
				X: ingredients[4].itemIds[0]
			}
		).id(r.getId())
	

	})
	

	
})

