-- Cleanup
core.clear_craft({ output = 'default:axe_wood' })
core.clear_craft({ output = 'default:axe_stone' })
core.clear_craft({ output = 'default:shovel_wood' })
core.clear_craft({ output = 'default:shovel_stone' })
core.clear_craft({ output = 'default:sword_wood' })
core.clear_craft({ output = 'default:sword_stone' })
core.clear_craft({ output = 'default:pick_wood' })
core.clear_craft({ output = 'default:pick_stone' })
core.clear_craft({ output = 'fire:flint_and_steel' })
core.clear_craft({ output = 'default:torch' })
core.clear_craft({ output = 'default:furnace' })
core.clear_craft({ output = 'farming:hoe_wood' })
core.clear_craft({ output = 'farming:hoe_stone' })
core.clear_craft({ output = 'spears:spear_stone' })

-- core.register_craft({
-- 	output = 'default:stick 6',
-- 	recipe = {
-- 		{ 'default:leaves' },
-- 		{ 'default:leaves' },
-- 		{ 'default:leaves' },
-- 	}
-- })

-- Stoneage tools
core.register_craft({
	type = 'shapeless',
	output = 'stoneage:firestriker_steel',
	recipe = { 'stoneage:silex', 'default:steel_ingot' },
})

core.register_craft({
	type = 'shapeless',
	output = 'stoneage:firestriker_stone',
	recipe = { 'stoneage:silex', 'group:stone' },
})

core.register_craft({
	output = 'stoneage:biface',
	recipe = {
		{ 'stoneage:silex' },
	}
})

-- Torches
core.register_craft({
	output = 'stoneage:torch_unlit 4',
	recipe = {
		{ 'charcoal:charcoal' },
		{ 'group:stick' },
	}
})

core.register_craft({
	output = 'stoneage:torch_unlit 4',
	recipe = {
		{ 'group:coal' },
		{ 'group:stick' },
	}
})

core.register_craft({
	type = 'shapeless',
	output = 'default:torch 2',
	recipe = { 'stoneage:torch_unlit', 'default:torch' },
})

core.register_craft({
	type = 'shapeless',
	output = 'stoneage:torch_unlit',
	recipe = { 'default:torch' },
})

core.register_craft({
	type = 'cooking',
	output = 'default:torch',
	recipe = 'stoneage:torch_unlit',
	cooktime = 1,
})

-- Furnace
core.register_craft({
	output = 'default:furnace',
	recipe = {
		{ 'group:stone', 'group:stone',   'group:stone' },
		{ 'group:stone', 'default:torch', 'group:stone' },
		{ 'group:stone', 'group:stone',   'group:stone' },
	}
})

core.register_craft({
	output = 'stoneage:mattock_wood',
	recipe = {
		{ 'group:wood', 'group:wood',  'group:wood' },
		{ '',           'group:stick', '' },
		{ '',           'group:stick', '' },
	}
})

core.register_craft({
	output = 'stoneage:club_wood',
	recipe = {
		{ 'group:wood' },
		{ 'group:wood' },
		{ 'group:stick' },
	}
})

core.register_craft({
	output = 'farming:hoe_stone',
	recipe = {
		{ 'stoneage:silex', 'group:silex' },
		{ '',               'group:stick' },
		{ '',               'group:stick' },
	}
})

-- core.register_craft({
-- 	output = "stoneage:shovel_wood",
-- 	recipe = {
-- 		{ 'group:wood' },
-- 		{ 'group:stick' },
-- 		{ 'group:stick' },
-- 	}
-- })

core.register_craft({
	output = "stoneage:pick_bone",
	recipe = {
		{ 'stoneage:gnawed_bone', 'stoneage:gnawed_bone', 'stoneage:gnawed_bone' },
		{ '',                     'group:stick',          '' },
		{ '',                     'group:stick',          '' },
	}
})

core.register_craft({
	output = "stoneage:shovel_bone",
	recipe = {
		{ 'stoneage:gnawed_bone' },
		{ 'group:stick' },
		{ 'group:stick' },
	}
})

-- core.register_craft({
-- 	output = "default:shovel_stone",
-- 	recipe = {
-- 		{ 'stoneage:silex' },
-- 		{ 'group:stick' },
-- 		{ 'group:stick' },
-- 	}
-- })

-----------------------------------------------------------------------------------------------
-- local title		= "String Recipes"
-- local version 	= "0.0.5"
-- local mname		= "stringrecipes"
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): 	WTFPL
-- Contains code from: 		
-- Looked at code from:		animaltools, default, farming
-- Dependencies: 			default, farming
-- Supports:				animalmaterials, dryplants
-----------------------------------------------------------------------------------------------

core.register_craft({
	output = "farming:string 4", -- looked at farming mod and thought: why not the other way around?
	recipe = {
		{ "group:wool" },
	}
})

-- primitivedeco

core.register_craft({
	output = 'stoneage:wisent',
	recipe = {
		{ 'dye:black', '',        'dye:black' },
		{ 'dye:red',   'dye:red', 'dye:red' },
		{ '',          'dye:red', '' },
	}
})


if (core.get_modpath("farming")) ~= nil then
	-----------------------------------------------------------------------------------------------
	-- Wooden Hoe -> Digging Stick
	-----------------------------------------------------------------------------------------------
	core.register_craft({
		output = 'stoneage:digging_stick',
		recipe = {
			{ 'group:stick', 'group:stick' },
			{ '',            'group:stick' },
			{ '',            'group:stick' },
		}
	})

	-----------------------------------------------------------------------------------------------
	-- Stone Hoe
	-----------------------------------------------------------------------------------------------
	core.register_craft({
		output = 'farming:hoe_stone',
		recipe = {
			{ 'stoneage:silex', 'stoneage:silex' },
			{ '',               'group:stick' },
			{ '',               'group:stick' },
		}
	})
end
