dofile(core.get_modpath("craft_overrides").."/extracompost.lua")

local ustones = {
	"afualite",
	"amphibolite",
	"andesite",
	"aplite",
	"basalt",
	"dark_vindesite",
	"diorite",
	"dolomite",
	"emutite",
	"gabbro",
	"gneiss",
	"granite",
	"green_slimestone",
	"hektorite",
	"limestone",
	"marble",
	"omphyrite",
	"pegmatite",
	"peridotite",
	"phonolite",
	"phylite",
	"purple_slimestone",
	"quartzite",
	"red_slimestone",
	"schist",
	"sichamine",
	"slate",
	"vindesite",
}

for _,stone in pairs(ustones) do
	core.register_craft({
		type = "shapeless",
		output = "default:cobble",
		recipe = {string.format("underch:%s_cobble",stone)},
	})
	techage.add_grinder_recipe({input=string.format("underch:%s_cobble",stone), output="default:gravel"})
end

local uncraftables = {
	"travelnet:travelnet",
	"travelnet:elevator",
	"replacer:replacer",
}

for _,item in pairs(uncraftables) do
	core.clear_craft({output=item})
end

techage.recipes.add("ta4_doser", {
	output = "bonemeal:fertiliser 2",
	input = {
		"techage:hydrogen 1",
		"techage:ammonia 2",
		"farming:salt 2",
	},
})

local def = table.copy(core.registered_items["bonemeal:fertiliser"])
def.groups = def.groups or {}
def.groups.powder = 1
core.override_item("bonemeal:fertiliser",{groups=def.groups})

core.clear_craft({output="icemachine:machine"})
core.register_craft({
	output = "icemachine:machine",
	recipe = {
		{"default:steel_ingot","techage:ta3_pipeS","techage:ta4_wlanchip"},
		{"techage:ta3_cylinder_small_gas","techpack_stairway:grating","basic_materials:ic"},
		{"default:steel_ingot","basic_materials:plastic_sheet","techage:ta4_display"},
	},
})

techage.add_grinder_recipe({input="basic_materials:plastic_sheet 4", output="techage:plastic_granules"})

techage.recipes.add("ta4_doser", {
	output = "techage:oil_source 1",
	input = {
		"techage:plastic_granules 2",
	},
})

local plastic = "basic_materials:plastic_sheet"
core.register_craft({
	output = "plasticbox:plasticbox 4",
	recipe = {
		{plastic,plastic,plastic},
		{plastic,plastic,plastic},
		{plastic,plastic,plastic},
	},
})

techage.add_grinder_recipe({input="ethereal:redwood_trunk", output="ethereal:redwood_leaves 8"})
techage.add_grinder_recipe({input="ethereal:willow_trunk", output="ethereal:willow_twig 8"})

core.override_item("default:coalblock",{groups={cracky=3,can_bonemeal=1}})
core.override_item("default:stone_with_coal",{groups={cracky=3,can_bonemeal=1}})
bonemeal:add_deco({{"default:coalblock",{"ethereal:illumishroom","ethereal:illumishroom2","ethereal:illumishroom3"},{}}})
bonemeal:add_deco({{"default:stone_with_coal",{"ethereal:illumishroom","ethereal:illumishroom2","ethereal:illumishroom3"},{}}})
