//ABOE scripts | All Rights Reserved unless otherwise explicitly stated.
//
//Information.
//This adds agricraft wheat seeds to all recipes that use vanilla wheat seeds.
//It also adds a recipe to craft vanilla wheat seeds from agricraft wheat seeds.
//The agricraft wheat seed is specifically the plain ones that drop from grass.
//No other agricraft seeds or NBT other than the default agricraft wheat seed are compatible with these changes.  This is intentional.
//
//Scripted by Predundant
//Last edited by Kevsky 03.02.2022 (EU date format) (improved syntax, Added branding, And added license).
//Last edited by <name> <date> (EU date format) (Changelog).

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

onEvent('recipes', event => {

    var agriw = Item.of('agricraft:agri_seed', '{agri_genome:[{agri_gene:"agri_species",agri_dominant:{agri_plant:"vanilla:wheat_plant"},agri_recessive:{agri_plant:"vanilla:wheat_plant"}},{agri_gene:"chicken",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"cow",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"fertility",agri_dominant:{fertility:1},agri_recessive:{fertility:1}},{agri_gene:"gain",agri_dominant:{gain:1},agri_recessive:{gain:1}},{agri_gene:"growth",agri_dominant:{growth:1},agri_recessive:{growth:1}},{agri_gene:"mutativity",agri_dominant:{mutativity:1},agri_recessive:{mutativity:1}},{agri_gene:"panda",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"pig",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"rabbit",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"resistance",agri_dominant:{resistance:1},agri_recessive:{resistance:1}},{agri_gene:"sheep",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}},{agri_gene:"strength",agri_dominant:{strength:1},agri_recessive:{strength:1}},{agri_gene:"turtle",agri_dominant:{agri_key:0b},agri_recessive:{agri_key:0b}}]}')

	//Vanilla Wheat Seed conversion.
	event.shapeless('minecraft:wheat_seeds', [agriw])
	
	//Add agricraft seed to shapeless recipes.
    event.replaceInput({type: 'minecraft:crafting_shapeless'}, 'minecraft:wheat_seeds', ['minecraft:wheat_seeds',agriw])

	//Add agricraft seed to shaped recipes.
    event.replaceInput({type: 'minecraft:crafting_shaped'}, 'minecraft:wheat_seeds', ['minecraft:wheat_seeds',agriw])
		
})
