// 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.remove({id:'alexsmobs:animal_dictionary'})
	
	event.remove({id:'parrying:guide_book'})
	
	event.remove({id:'minecraft:white_wool_from_string'})
	
	event.remove({output:'minecraft:paper'})
	
	event.remove({id:'minecraft:painting'})
	
	event.remove({output:'#forge:bookshelves'})
	
	event.remove({id:'minecraft:granite'})
	
	event.remove({id:'minecraft:diorite'})
	
	event.remove({id:'minecraft:andesite'})
	
	event.remove({id:'minecraft:bone_meal'})
	
	event.remove({id:'minecraft:stonecutter'})
	
	event.remove({id:'minecraft:blast_furnace'})
	
	event.remove({id:'minecraft:anvil'})
	
	event.remove({id:'minecraft:soul_torch'})
	
	event.remove({id:'endergetic:ender_torch'})
	
	event.remove({id:'projectvibrantjourneys:cyan_dye'})
	
	event.remove({id:'neapolitan:vanilla/lime_dye_from_vanilla_pods'})
	
	event.remove({id:'minecraft:blaze_powder'})
	
	event.remove({mod:'minecraft', output:'minecraft:sugar'})
	
	event.remove({mod:'minecraft', output:'#forge:dyes'})
	
	event.remove({mod:'upgrade_aquatic', output:'#forge:dyes'})

	event.remove({id:'minecraft:enchanting_table'})

	event.remove({id:'minecraft:netherite_ingot'})

	event.remove({id:'enigmaticlegacy:etherium_ingot'})

	event.remove({id:'enigmaticlegacy:etherium_ingot_from_blasting'})

	event.replaceInput({id:'minecraft:flint_and_steel'}, 'minecraft:iron_ingot', 'steampowered:steel_ingot')
	
	event.recipes.createMilling('2x minecraft:cyan_dye', 'minecraft:warped_roots')
	
	event.recipes.createMilling('2x minecraft:lime_dye', 'neapolitan:vanilla_pods')
	
	event.recipes.createMilling(['2x minecraft:cyan_dye', Item.of('minecraft:green_dye').withChance(0.1)], 'upgrade_aquatic:blue_pickerelweed')
	
	event.recipes.createMilling(['2x minecraft:purple_dye', Item.of('minecraft:green_dye').withChance(0.1)], 'upgrade_aquatic:purple_pickerelweed')

	event.recipes.createCompacting('2x steampowered:steel_ingot', ['3x steampowered:cast_iron_ingot', '4x minecraft:coal']).heated()

	event.recipes.createCrushing(['minecraft:netherite_scrap', Item.of('minecraft:netherite_scrap').withChance(0.5)], 'minecraft:ancient_debris')
	
	event.recipes.createCompacting('minecraft:netherite_ingot', ['4x minecraft:netherite_scrap', '2x minecraft:gold_ingot']).superheated()

	event.recipes.createCompacting('enigmaticlegacy:etherium_ingot', ['enigmaticlegacy:etherium_ore', '2x create:refined_radiance']).superheated()
	
	event.shaped('minecraft:enchanting_table', [
		' E ',
		'DSD',
		'SFS'
	], {
		E: 'minecraft:enchanted_book',
		D: 'minecraft:diamond',
		S: 'kubejs:obsidian_shard',
		F: 'goety:emptycore'
	})

	event.shaped('minecraft:enchanting_table', [
		' E ',
		'DSD',
		'SFS'
	], {
		E: 'quark:ancient_tome',
		D: 'minecraft:diamond',
		S: 'kubejs:obsidian_shard',
		F: 'goety:emptycore'
	})
	
	event.shaped('minecraft:stonecutter', [
		' I ',
		'PSP'
	], {
		I: 'steampowered:steel_sheet',
		P: '#kubejs:plank',
		S: '#forge:stone'
	})
	
	event.shaped('minecraft:blast_furnace', [
		'SSS',
		'S S',
		'SMS'
	], {
		S: 'steampowered:cast_iron_sheet',
		M: 'minecraft:smooth_stone'
	})
	
	event.shaped('minecraft:anvil', [
		'BBB',
		' I ',
		'III'
	], {
		B: 'simplysteel:steel_block',
		I: 'steampowered:steel_ingot'
	})
	
	event.shaped('minecraft:soul_torch', [
		'G',
		'S',
		'A'
	], {
		G: 'minecraft:glowstone_dust',
		S: 'minecraft:stick',
		A: 'kubejs:pile_of_soul_sand'
	})
	
	event.shaped('minecraft:soul_torch', [
		'G',
		'S',
		'A'
	], {
		G: 'minecraft:glowstone_dust',
		S: 'minecraft:stick',
		A: 'kubejs:pile_of_soul_soil'
	})
	
	event.shaped('endergetic:ender_torch', [
		'G',
		'S',
		'A'
	], {
		G: 'minecraft:glowstone_dust',
		S: 'minecraft:stick',
		A: 'charm:endermite_powder'
	})

	event.shapeless('neapolitan:banana_crate', '9x neapolitan:banana_bunch')
	event.shapeless('neapolitan:adzuki_crate', '9x neapolitan:adzuki_beans')
	event.shapeless('neapolitan:roasted_adzuki_crate', '9x neapolitan:roasted_adzuki_beans')
	
	//penguinlib
	
	event.remove({mod:'penguinlib'})
	
	//unionlib
	
	event.remove({id:'unionlib:golden_ring'})
		
	//survivalist
	
	event.remove({input:'#survivalist:rocks'})
	
	event.remove({input:'survivalist:plant_fibres'})
		
	event.remove({output:'#survivalist:chopping_blocks'})
		
	event.remove({id:'survivalist:sawmill'})
		
	event.remove({id:'survivalist:pick'})
		
	event.remove({id:'survivalist:spade'})
		
	event.remove({id:'survivalist:hatchet'})
		
	event.remove({id:'survivalist:dough'})
		
	event.remove({output:'survivalist:round_bread'})
	
	event.remove({output:'survivalist:plant_fibres'})
	
	event.replaceInput('survivalist:tanned_leather', 'improvedbackpacks:tanned_leather')
	
	//simplysteel
	
	event.replaceInput('simplysteel:steel_ingot', 'steampowered:steel_ingot')
	
	event.replaceOutput('simplysteel:steel_ingot', 'steampowered:steel_ingot')
	
	event.remove({id:'simplysteel:crude_iron'})
	
	event.remove({id:'simplysteel:steel_ingot_from_blasting'})
	
	//locks
	
	event.replaceOutput({id:'locks:steel_lock_pick'}, 'locks:iron_lock_pick', 'locks:steel_lock_pick')
	
	//farmersdelight
	
	event.remove({id:'farmersdelight:canvas'})
	
	event.remove({id:'farmersdelight:rope'})
	
	event.remove({id:'farmersdelight:paper_from_tree_bark'})
	
	event.remove({id:'farmersdelight:painting_from_canvas'})
	
	event.remove({id:'farmersdelight:canvas_rug'})
	
	event.remove({id:'farmersdelight:scaffolding_from_canvas'})
	
	event.replaceInput({id:'farmersdelight:stove'}, 'minecraft:bricks', 'minecraft:brick')
	
	event.replaceInput({id:'farmersdelight:cooking_pot'}, 'minecraft:iron_ingot', 'create:iron_sheet')
	
	event.replaceInput({id:'farmersdelight:skillet'}, 'minecraft:iron_ingot', 'create:iron_sheet')
	
	event.replaceInput({id:'farmersdelight:safety_net'}, 'farmersdelight:rope', 'supplementaries:rope')
	
	event.replaceInput({id:'farmersdelight:lead_from_rope'}, 'farmersdelight:rope', 'supplementaries:rope')
	
	event.replaceInput({id:'farmersdelight:grilled_salmon'}, 'farmersdelight:cooked_salmon_slice', 'minecraft:cooked_salmon')
	
	event.shaped('4x minecraft:scaffolding', [
			'BCB',
			'B B',
			'B B'
		], {
			C: 'farmersdelight:canvas',
			B: 'minecraft:bamboo'
		})
	
	event.replaceInput('farmersdelight:tree_bark', '#forge:bark')
	
	event.shaped('farmersdelight:canvas_rug', [
		'CC'
	], {
		C: 'farmersdelight:canvas'
	})
	
	//zetter
	
	event.remove({id:'zetter:canvas'})
	
	event.remove({id:'zetter:palette'})
	
	event.shaped('zetter:canvas', [
		' P ',
		'PRP',
		' P '
	], {
		P: 'minecraft:paper',
		R: 'farmersdelight:canvas_rug'
	})
	
	event.shapeless('zetter:palette', ['#kubejs:plank', 'zetter:paints'])
	
	//consecration
	
	event.remove({id:'consecration:fire_stick'})
	
	//natural-progression
	
	event.remove({id:'natural-progression:crafting/flint_hatchet'})
	
	event.remove({id:'natural-progression:crafting/bone_pickaxe'})
	
	event.shapeless('natural-progression:flint_hatchet', ['2x minecraft:flint', '#kubejs:bindings', 'minecraft:stick'])
	
	event.shapeless('natural-progression:bone_pickaxe', ['natural-progression:bone_shard', '#kubejs:bindings', 'minecraft:stick'])
	
	//husbandry
	
	event.remove({id:'husbandry:boiled_egg_campfire'})
	
	event.remove({id:'husbandry:boiled_egg_smelting'})
	
	event.remove({id:'husbandry:boiled_egg_smoking'})
	
	event.remove({id:'husbandry:name_tag'})
	
	event.remove({id:'husbandry:stone_sickle'})
	
	event.remove({id:'husbandry:ice_cream'})
	
	event.remove({id:'husbandry:mug_of_milk'})
	
	event.remove({id:'husbandry:mob_tracker'})
	
	event.remove({output:'husbandry:hot_milk'})
	
	event.replaceInput({id:'husbandry:brush'}, 'minecraft:wheat', 'farmersdelight:straw')

	event.shapeless('husbandry:mob_tracker', ['minecraft:enchanted_book', 'create:precision_mechanism', 'minecraft:ink_sac'])

	event.shapeless('husbandry:mob_tracker', ['quark:ancient_tome', 'create:precision_mechanism', 'minecraft:ink_sac'])
	
	//quark
	
	event.remove({id:'quark:building/crafting/thatch'})
	
	event.remove({id:'quark:building/crafting/iron_plate'})
	
	event.remove({id:'quark:building/crafting/rusty_iron_plate'})
	
	event.remove({type:'minecraft:crafting_shaped', input:'#quark:shards'})
	event.remove({id:'quark:tweaks/crafting/dirty_glass'})
	
	event.shaped('quark:thatch',[
		'SS',
		'SS'
	], {
		S: 'farmersdelight:straw'
	})
	
	event.shaped('4x quark:iron_plate',[
		'PPP',
		'P P',
		'PPP'
	], {
		P: 'steampowered:cast_iron_sheet'
	})
	
	event.shaped('4x quark:rusty_iron_plate',[
		'PPP',
		'PWP',
		'PPP'
	], {
		P: 'steampowered:cast_iron_sheet',
		W: 'minecraft:water_bucket'
	}).replaceIngredient('minecraft:water_bucket', 'minecraft:bucket')
	
	event.recipes.createCompacting('minecraft:glass', '4x quark:clear_shard').heated()
	event.recipes.createCompacting('minecraft:white_stained_glass', '4x quark:white_shard').heated()
	event.recipes.createCompacting('minecraft:orange_stained_glass', '4x quark:orange_shard').heated()
	event.recipes.createCompacting('minecraft:magenta_stained_glass', '4x quark:magenta_shard').heated()
	event.recipes.createCompacting('minecraft:light_blue_stained_glass', '4x quark:light_blue_shard').heated()
	event.recipes.createCompacting('minecraft:yellow_stained_glass', '4x quark:yellow_shard').heated()
	event.recipes.createCompacting('minecraft:lime_stained_glass', '4x quark:lime_shard').heated()
	event.recipes.createCompacting('minecraft:pink_stained_glass', '4x quark:pink_shard').heated()
	event.recipes.createCompacting('minecraft:gray_stained_glass', '4x quark:gray_shard').heated()
	event.recipes.createCompacting('minecraft:light_gray_stained_glass', '4x quark:light_gray_shard').heated()
	event.recipes.createCompacting('minecraft:cyan_stained_glass', '4x quark:cyan_shard').heated()
	event.recipes.createCompacting('minecraft:purple_stained_glass', '4x quark:purple_shard').heated()
	event.recipes.createCompacting('minecraft:blue_stained_glass', '4x quark:blue_shard').heated()
	event.recipes.createCompacting('minecraft:brown_stained_glass', '4x quark:brown_shard').heated()
	event.recipes.createCompacting('minecraft:green_stained_glass', '4x quark:green_shard').heated()
	event.recipes.createCompacting('minecraft:red_stained_glass', '4x quark:red_shard').heated()
	event.recipes.createCompacting('minecraft:black_stained_glass', '4x quark:black_shard').heated()
	
	event.recipes.createCompacting('quark:dirty_glass', '4x #quark:shards').heated()
	
	//cold_sweat
	
	event.remove({id:'cold_sweat:sewing_table'})
	
	//treebark
	
	event.remove({mod:'treebark', type:'minecraft:crafting_shaped'})
	
	//create
	
	event.remove({id:'create:crafting/appliances/slime_ball'})
	
	event.replaceInput({output:'create:andesite_alloy'}, 'minecraft:andesite', 'natural-progression:andesite_pebble')
	
	event.replaceInput({id:'create:crafting/materials/sand_paper'}, 'minecraft:paper', 'kubejs:wet_paper')
	event.replaceInput({id:'create:crafting/materials/red_sand_paper'}, 'minecraft:paper', 'kubejs:wet_paper')
	event.replaceInput({id:'create:crafting/materials/sand_paper'}, 'minecraft:sand', 'kubejs:pile_of_sand')
	event.replaceInput({id:'create:crafting/materials/red_sand_paper'}, 'minecraft:red_sand', 'kubejs:pile_of_red_sand')
	
	//inspirations
	
	event.remove({id:'inspirations:tools/charged_arrow'})
	
	event.remove({id:'inspirations:tools/dimension_compass'})
	
	event.remove({output:'#inspirations:shelves'})
	
	event.shaped('4x inspirations:charged_arrow', [
		'R',
		'S',
		'F'
	], {
		R: 'minecraft:redstone',
		S: 'minecraft:stick',
		F: 'minecraft:feather'
	})
	
	//supplementaries
	
	event.remove({id:'supplementaries:key'})
	
	event.remove({id:'create:empty_inspirations_honey_bucket_of_inspirations_honey'})
	
	event.remove({id:'inspirations:cauldron/honey/empty_bottle'})
	
	event.remove({id:'inspirations:cauldron/honey/melt'})
	
	event.remove({id:'inspirations:cauldron/honey/solidify'})
	
	event.remove({id:'create:fill_minecraft_bucket_with_inspirations_honey'})
	
	event.remove({id:'supplementaries:daub'})
	
	//roughtweaks
	
	event.replaceInput({id:'roughtweaks:salve3'}, 'minecraft:cactus', 'quark:cactus_paste')
	
	//charm
	
	event.remove({id:'charm:block_of_gunpowder/gunpowder_block_with_quark'})
	
	event.remove({id:'charm:extra_recipes/trident'})
	event.remove({id:'charm:extra_recipes/soul_torch'})
	
	event.remove({id:'charm:woodcutters/woodcutter'})
	event.remove({type:'charm:woodcutting'})
	
	event.shapeless('charm:gunpowder_block', '9x minecraft:gunpowder')
	
	event.custom({
		"type": "charm:firing",
		"ingredient": {"item": "quark:dirty_glass"},
		"result": "minecraft:glass",
		"experience": 0.1,
		"cookingtime": 100
	})
	
	//upgradeaquatic
	
	event.remove({output:'upgrade_aquatic:prismarine_rod'})
	event.remove({input:'upgrade_aquatic:prismarine_rod'})
	
	event.remove({id:'upgrade_aquatic:bone_meal_from_tooth'})
	event.recipes.createMilling(['3x minecraft:bone_meal', Item.of('3x minecraft:bone_meal').withChance(0.25), Item.of('minecraft:white_dye').withChance(0.25)], 'upgrade_aquatic:thrasher_tooth')

	//alexsmobs
	
	event.replaceInput({id:'alexsmobs:enderiophage_rocket'}, 'minecraft:end_stone', 'natural-progression:end_stone_pebble')

	event.replaceInput({id:'alexsmobs:gustmaker'}, 'minecraft:cut_sandstone', 'natural-progression:sandstone_pebble')
	
	//custom
	
	event.shapeless('minecraft:obsidian', ['kubejs:obsidian_bucket']).replaceIngredient('kubejs:obsidian_bucket', 'create:iron_sheet')
	
	event.shapeless('kubejs:paper_pulp', ['3x kubejs:saw_dust', Item.of('minecraft:potion', '{Potion:"minecraft:water"}')]).replaceIngredient(Item.of('minecraft:potion', '{Potion:"minecraft:water"}'), 'minecraft:glass_bottle')
	
	event.shapeless('2x kubejs:paper_pulp', ['6x kubejs:saw_dust', 'minecraft:water_bucket']).replaceIngredient('minecraft:water_bucket', 'minecraft:bucket')
	
	event.recipes.createMixing('kubejs:paper_pulp', ['kubejs:paper_pulp', 'kubejs:paper_pulp', 'kubejs:paper_pulp', Fluid.of('minecraft:water', 250)])
	
	event.shaped('kubejs:wool_hood', [
			'WWW',
			'W W'
		], {
			W: '#quark:quilted_wools'
		})
	event.shaped('kubejs:wool_jacket', [
			'W W',
			'WWW',
			'WWW'
		], {
			W: '#quark:quilted_wools'
		})
	event.shaped('kubejs:wool_pants', [
			'WWW',
			'W W',
			'W W'
		], {
			W: '#quark:quilted_wools'
		})
	event.shaped('kubejs:wool_boots', [
			'W W',
			'W W'
		], {
			W: '#quark:quilted_wools'
		})
})

onEvent('item.right_click', event => {
	if(event.item.hasTag('kubejs:bad_buckets')){
		bucket = event.item
		event.player.inventory.set(event.player.selectedSlot, Item.empty)
		event.player.giveInHand(bucket)
		event.cancel()
		//event.player.inventory.set(event.player.selectedSlot, Item.empty)
		//event.player.giveInHand(bucket)
	}
})