// priority: 0

settings.logAddedRecipes = true
settings.logRemovedRecipes = true
settings.logSkippedRecipes = false
settings.logErroringRecipes = true

console.info('Hello, World! (You will see this line every time server resources reload)')

onEvent('recipes', event => {
	// Change recipes here
	event.shapeless('create:blaze_burner', [
		'create:empty_blaze_burner',
		'lotr:durnor',
	])
	event.shapeless('minecraft:diamond', [
		'lotr:diamond',
	])
	event.shaped('create:gearshift', [
		' A ',
		'BCB',
		' A '
	],{
		A: 'lotr:gate_gear',
		B: '#forge:cogwheel',
		C: 'create:andesite_casing'
	})
	event.shaped('create:adjustable_chain_gearshift', [
		' A ',
		' B ',
		' C '
	],{
		A: 'lotr:gate_gear',
		B: 'create:encased_chain_drive',
		C: '#forge:large_cogwheel'
	})
	event.shaped('create:sequenced_gearshift', [
		' A ',
		'BCB',
		' D '
	],{
		A: 'lotr:gate_gear',
		B: '#forge:cogwheel',
		C: 'create:brass_casing',
		D: 'minecraft:clock'
	})
	event.shaped(
		Item.of('create:brass_funnel', 2), [
		'   ',
		'ABA',
		' C '
	],{
		A: 'create:brass_ingot',
		B: 'lotr:gate_gear',
		C: 'minecraft:dried_kelp'
	})
	event.shaped(
		Item.of('create:brass_tunnel', 2), [
			'A  ',
			'BB ',
			'CC '
		],{
			A: 'lotr:gate_gear',
			B: 'create:brass_ingot',
			C: 'minecraft:dried_kelp'
		}
	)
	event.shaped(
		Item.of('create:controller_rail', 6), [
			'A A',
			'ABA',
			'ACA'
		],{
			A: 'minecraft:gold_ingot',
			B: '#forge:rods/wooden',
			C: 'create:copper_sheet'
		}
	)
	event.shaped(
		Item.of('minecraft:powered_rail', 6), [
			'A A',
			'ABA',
			'ACA'
		],{
			A: 'minecraft:gold_ingot',
			B: '#forge:rods/wooden',
			C: 'create:golden_sheet'
		}
	)
	event.shaped(
		Item.of('create:controller_rail', 6), [
			'A A',
			'ABA',
			'ACA'
		],{
			A: 'minecraft:iron_ingot',
			B: 'minecraft:stone_pressure_plate',
			C: 'create:copper_sheet'
		}
	)
	event.shaped(
		Item.of('minecraft:activator_rail', 6), [
			'ABA',
			'ACA',
			'ABA'
		],{
			A: 'minecraft:iron_ingot',
			B: '#forge:rods/wooden',
			C: 'create:copper_sheet'
		}
	)
	event.shaped(
		Item.of('minecraft:piston'), [
			'AAA',
			'BCB',
			'BDB'
		],{
			A: '#minecraft:planks',
			B: '#forge:cobblestone',
			C: 'minecraft:iron_ingot',
			D: 'create:golden_sheet'
		}
	)
	event.shaped(
		Item.of('create:mechanical_crafter', 3,), [
			' A ',
			'BCB',
			' D '
		],{
			A: 'create:brass_sheet',
			B: '#forge:cogwheel',
			C: 'create:brass_casing',
			D: 'minecraft:crafting_table'
		}
	)
	event.shaped('create:clockwork_bearing', [
		' A ',
		'BCB',
		' D '
	],{
		A: 'create:turntable',
		B: 'create:brass_sheet',
		C: 'create:brass_casing',
		D: 'create:shaft'
	})
	event.shaped('minecraft:blaze_rod', [
		' A ',
		'BCB',
		' D '
	],{
		A: 'lotr:durnor',
		B: 'lotr:durnor',
		C: 'lotr:durnor_block',
		D: 'lotr:durnor'
	})
	event.shaped('create:smart_chute', [
		' A ',
		' B ',
		' C '
	],{
		A: 'create:brass_sheet',
		B: 'create:chute',
		C: 'minecraft:dried_kelp'
	})
	event.shaped('minecraft:ender_pearl', [
		' A ',
		' B ',
		' C '
	],{
		A: 'lotr:edhelvir',
		B: 'lotr:niter',
		C: 'lotr:niter'
	})
	event.shaped('create:smart_fluid_pipe', [
		' A ',
		' B ',
		' C '
	],{
		A: 'create:brass_sheet',
		B: 'create:fluid_pipe',
		C: 'minecraft:dried_kelp'
	})
	event.shaped('create:cart_assembler', [
		' A ',
		'BCB',
		'A A'
	],{
		A: '#minecraft:logs',
		B: 'create:andesite_alloy',
		C: 'create:golden_sheet'
	})
	event.shaped('create:deployer', [
		' A ',
		'BCB',
		' D '
	],{
		A: 'create:shaft',
		B: '#forge:cogwheel',
		C: 'create:andesite_casing',
		D: 'create:brass_hand'
	})
	event.replaceInput(
		{ input: 'minecraft:diamond' }, // Arg 1: the filter
		'minecraft:diamond',            // Arg 2: the item to replace
		'lotr:diamond'         // Arg 3: the item to replace it with
		// Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
	  )
	event.blasting('minecraft:quartz', 'lotr:white_sand')
	event.recipes.createMilling([
		'create:cinder_flour',
	  ], 'lotr:hearth_block')
	event.recipes.createCrushing([
		'create:cinder_flour',
		Item.of('create:cinder_flour').withChance(0.2)
	  ], 'lotr:hearth_block')
	event.recipes.createCrushing([
		'minecraft:red_sand',
		Item.of('minecraft:quartz').withChance(0.1)
	  ], 'minecraft:granite')
	event.recipes.createCrushing([
		'create:limesand',
		Item.of('minecraft:quartz').withChance(0.2),
		Item.of('lotr:white_sand').withChance(0.1)
	  ], 'minecraft:diorite')
	event.recipes.createMilling([
		'lotr:durnor_block',
	  ],'minecraft:blaze_rod')
	event.remove({output: 'create:copper_block'})
	event.remove({output: 'iceandfire:copper_block'})
	event.remove({output: 'iceandfire:armor_red_helmet'})
	event.remove({output: 'iceandfire:armor_red_chestplate'})
	event.remove({output: 'iceandfire:armor_red_leggings'})
	event.remove({output: 'iceandfire:armor_red_boots'})
	event.remove({output: 'iceandfire:armor_bronze_helmet'})
	event.remove({output: 'iceandfire:armor_bronze_chestplate'})
	event.remove({output: 'iceandfire:armor_bronze_leggings'})
	event.remove({output: 'iceandfire:armor_bronze_boots'})
	event.remove({output: 'iceandfire:armor_green_helmet'})
	event.remove({output: 'iceandfire:armor_green_chestplate'})
	event.remove({output: 'iceandfire:armor_green_leggings'})
	event.remove({output: 'iceandfire:armor_green_boots'})
	event.remove({output: 'iceandfire:armor_gray_helmet'})
	event.remove({output: 'iceandfire:armor_gray_chestplate'})
	event.remove({output: 'iceandfire:armor_gray_leggings'})
	event.remove({output: 'iceandfire:armor_gray_boots'})
	event.remove({id: 'lotr:copper_block'})
	event.shaped('create:copper_block', [
		'AAA',
		'AAA',
		'AAA'
	],{
		A: '#forge:copper_ingot'
	})
	event.remove({id: 'lotr:bronze_ingot_from_crafting'})
	event.recipes.createMixing('lotr:bronze_ingot', ['#forge:copper_ingot', 'lotr:tin_ingot']).heated()
// Get the #forge:cobblestone tag collection and add Diamond Ore to it
    //event.add('forge:cogwheel', 'create:cogwheel')
	// Get the #forge:cobblestone tag collection and remove Mossy Cobblestone from it
	// event.get('forge:cobblestone').remove('minecraft:mossy_cobblestone')
})