local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)

--ore
local ore_noise =
{
	offset = -3.9,
	scale = 4,
	spread = {x = 250, y = 350, z = 250},
	seed = 458934,
	octaves = 3,
	persist = 0.7,
	lacunarity = 4,
}
local ore_perlin

minetest.register_node(modname .. ":ore",
	{
		description = S("Mese ore"),
		drawtype = "normal",
		tiles = {"mapgen_stone.png^eg_mese_ore.png"},
		is_ground_content = true,
		groups = {cracky = 3},
		light_source = 10,
		sounds =
		{
			footstep = {name = "stone_footstep", gain = 0.3},
			dig = {name = "stone_dig", gain = 0.5},
			dug = {name = "stone_footstep", gain = 1.0},
			place = {name = "stone_place", gain = 1.0},
		},
	})

local oredef =
{
	ore_type = "scatter",
	ore = modname .. ":ore",
	wherein = "eg_mapgen:stone",
	clust_scarcity = 7,
	clust_num_ores = 8,
	clust_size = 5,
	noise_threshold = 0,
	noise_params = ore_noise,
	y_min = -31000,
	y_max = -300,
}

minetest.register_ore(oredef)

eg_prospector.register_prospectable(S("Mese"), oredef)
