// priority: 0

const splashPrimaryChance = 0.25
const splashSecondaryChance = 0.25

onEvent('recipes', event => {
    //sandClayBall
    event.remove({ id: CR("splashing/sand") })
	event.recipes.createSplashing([Item.of(MC("clay_ball")).withChance(splashSecondaryChance)], MC("sand"))

    //cobbleGravelIron
    event.remove({ id: CR("milling/cobblestone") })
	event.remove({ id: CR("crushing/cobblestone") })
	event.recipes.createMilling([MC("gravel")], MC("cobblestone")).processingTime(processingTimesDefault.milling)
	
	event.remove({ id: CR("splashing/gravel") })
	event.recipes.createSplashing([
		Item.of(MC("iron_nugget")).withChance(splashPrimaryChance),
		Item.of(MC("flint")).withChance(splashSecondaryChance)
	], MC("gravel"))

    //gravelSand
    event.remove({ id: CR("milling/gravel") })
	event.remove({ id: CR("crushing/gravel") })
	event.recipes.createMilling([
		MC("sand")
	], MC("gravel")).processingTime(processingTimesDefault.milling)

    //crushedGraniteCopper
    event.remove({ id: MC("granite") })
	event.remove({ id: CR("compacting/granite_from_flint") })
	event.remove({ id: CR("milling/granite") })
	event.remove({ id: CR("crushing/granite") })
	event.recipes.createMilling([ENS("crushed_granite")], MC("granite")).processingTime(processingTimesDefault.milling)

	event.recipes.createSplashing([
		Item.of(EE("copper_nugget")).withChance(splashPrimaryChance),
		Item.of(MC("redstone")).withChance(splashSecondaryChance)
	], ENS("crushed_granite"))

    //crushedDioriteZinc
    event.remove({ id: MC("diorite") })
	event.remove({ id: CR("compacting/diorite_from_flint") })
	event.remove({ id: CR("milling/diorite") })
	event.remove({ id: CR("crushing/diorite") })
	event.remove({ id: CR("crushing/diorite_recycling") })
	event.recipes.createMilling([ENS("crushed_diorite")], MC("diorite")).processingTime(processingTimesDefault.milling)

	event.recipes.createSplashing([
		Item.of(EE("zinc_nugget")).withChance(splashPrimaryChance),
		Item.of(MC("quartz")).withChance(splashSecondaryChance)
	], ENS("crushed_diorite"))

    //crushedAndesiteNickel
    event.remove({ id: MC("andesite") })
	event.remove({ id: CR("compacting/andesite_from_flint") })
	event.remove({ id: CR("milling/andesite") })
	event.remove({ id: CR("crushing/andesite") })
	event.remove({ id: CR("crushing/andesite_recycling") })
	event.recipes.createMilling([ENS("crushed_andesite")], MC("andesite")).processingTime(processingTimesDefault.milling)

	event.recipes.createSplashing([
		Item.of(EE("nickel_nugget")).withChance(splashPrimaryChance),
		Item.of(MC("gunpowder")).withChance(splashSecondaryChance)
	], ENS("crushed_andesite"))

    //crushedNetherrackGold
    event.remove({ id: CR("milling/terracotta") })
	event.remove({ id: CR("milling/netherrack") })
	event.remove({ id: CR("crushing/netherrack") })
	event.recipes.createMilling([ENS("crushed_netherrack")], MC("netherrack")).processingTime(processingTimesDefault.milling)
	
	event.remove({ id: CR("splashing/red_sand") })
	event.recipes.createSplashing([
		Item.of(MC("gold_nugget")).withChance(splashPrimaryChance),
		Item.of(CR("cinder_flour")).withChance(splashSecondaryChance)
	], ENS("crushed_netherrack"))

    //crushedEndStoneDiamond
	event.recipes.createMilling([ENS("crushed_end_stone")], MC("end_stone")).processingTime(processingTimesDefault.milling)

	event.recipes.createSplashing([
		Item.of(EE("diamond_fragment")).withChance(splashPrimaryChance),
		Item.of(AE2("ender_dust")).withChance(splashSecondaryChance)
	], ENS("crushed_end_stone"))

    //soulSoilSand
	event.recipes.createMilling([MC("soul_sand")], MC("soul_soil")).processingTime(processingTimesDefault.milling)
})