earthgen.register_ore({ name = "air", wherein = "default:stone", seed_diff = 1234, maxhdistance = 70, maxvdistance = 70, maxheight = -3, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0.2, seg_incl_dev = 0.6, turnangle = 57, forkturnangle = 57, num_per_block = 5, num_branches_n = 2, num_branches_dev = 0, mothersize_n = -1, mothersize_dev = 0, size_n = 100, size_dev = 30, radius = 2.3 }) earthgen.register_ore({ name = "default:stone_with_iron", wherein = "default:stone", seed_diff = 0, maxhdistance = 20, maxvdistance = 20, maxheight = -16, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0, seg_incl_dev = 0.6, turnangle = 57, forkturnangle = 57, num_per_block = 10 }) earthgen.register_ore({ name = "default:stone_with_coal", wherein = "default:stone", seed_diff = 1, maxhdistance = 20, maxvdistance = 20, -- maxvdistance = 10, size_n = 54, size_dev = 27, maxheight = 64, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0, seg_incl_dev = 0.36, turnangle = 57, forkturnangle = 57, radius = 1, num_per_block = 6 }) earthgen.register_ore({ name = "default:stone_with_mese", wherein = "default:stone", seed_diff = 2, maxvdistance = 50, size_n = 7, size_dev = 3, maxheight = -128, seg_length_n = 2, seg_length_dev = 1, seg_incl_n = 4, seg_incl_dev = 1, turnangle = 57, forkturnangle = 57, num_per_block = 0.8, num_branches_n = 2, num_branches_dev = 1, fork_chance = 0.1, mothersize_n = 0, mothersize_dev = 0 }) earthgen.register_ore({ name = "default:mese", wherein = "default:stone", seed_diff = 3, maxvdistance = 50, size_n = 3, size_dev = 1, maxheight = -256, -- -1024 in a full-size world seg_length_n = 2, seg_length_dev = 1, seg_incl_n = 4, seg_incl_dev = 1, turnangle = 57, forkturnangle = 57, num_branches_n = 2, num_branches_dev = 1, fork_chance = 0.1, radius = 1 }) -- Same parameters exactly as the previous one so it spawns inside earthgen.register_ore({ name = "default:lava_source", wherein = "default:mese", seed_diff = 3, maxvdistance = 50, size_n = 3, size_dev = 1, maxheight = -256, -- -1024 in a full-size world seg_length_n = 2, seg_length_dev = 1, seg_incl_n = 4, seg_incl_dev = 1, turnangle = 57, forkturnangle = 57, num_branches_n = 2, num_branches_dev = 1, fork_chance = 0.1, mothersize_n = 0, mothersize_dev = 0 }) earthgen.register_ore({ name = "default:stone_with_copper" , wherein = "default:stone", seed_diff = 4, maxhdistance = 20, maxvdistance = 20, -- maxvdistance = 10.5, maxheight = -16, radius = 2, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0, seg_incl_dev = 0.6, turnangle = 57, forkturnangle = 57, num_per_block = 20, -- 2 in the original code }) earthgen.register_ore({ name = "default:stone_with_tin" , wherein = "default:stone", seed_diff = 3742, maxhdistance = 20, maxvdistance = 20, -- maxvdistance = 10.5, maxheight = -16, radius = 2, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0, seg_incl_dev = 0.6, turnangle = 57, forkturnangle = 57, num_per_block = 5, }) earthgen.register_ore({ name = "default:stone_with_diamond", wherein = "default:stone", seed_diff = 5, maxvdistance = 50, size_n = 20, size_dev = 5, maxheight = -256, seg_length_n = 4, seg_length_dev = 2, seg_incl_n = 0.3, seg_incl_dev = 0.1, turnangle = 57, forkturnangle = 57, num_branches_n = 2, num_branches_dev = 1, fork_chance = 0.1, radius = 1 }) earthgen.register_ore({ name = "default:stone_with_gold", wherein = "default:stone", seed_diff = 17, maxhdistance = 20, maxvdistance = 20, size_n = 3, size_dev = 2, maxheight = -10, seg_length_n = 4, seg_length_dev = 1, seg_incl_n = 0.6, seg_incl_dev = 0.4, turnangle = 57, forkturnangle = 57, num_branches_n = 2, num_branches_dev = 1, fork_chance = 0.1, num_per_block = 5, radius = 2 }) earthgen.register_ore({ name = "default:clay", wherein = "default:dirt", seed_diff = 6, maxvdistance = 10.5, maxheight = 0, minheight = -50, size_n = 50, size_dev = 20, seg_length_n = 15, seg_length_dev = 6, seg_incl_n = 0, seg_incl_dev = 0.6, turnangle = 57, forkturnangle = 57, num_per_block = 1, radius = 1.5 }) local param_lava = { name = "default:lava_source", seed_diff = 7, maxhdistance = 20, maxvdistance = 70, maxheight = -100, seg_length_n = 2, seg_length_dev = 1, seg_incl_n = -5, seg_incl_dev = 2, turnangle = 57, forkturnangle = 57, num_per_block = 1, num_branches_n = 2, num_branches_dev = 1, mothersize_n = 5, mothersize_dev = 3, size_n = 8, size_dev = 2, radius = 2.3 } earthgen.register_ore (param_lava) -- =================================================================== local blue_source = "bluelava:lava_source" if ocutil.node_exists (blue_source) then local p = ocutil.clone_table (param_lava) p.name = blue_source p.seed_diff = 5808 earthgen.register_ore (p) end -- =================================================================== local ore_def local proto_ore_def = { name = nil , wherein = "default:stone" , seed_diff = 42 , -- should normally be unique maxheight = -64 , maxvdistance = 50 , radius = 2 , -- 1 to 2.5 seg_incl_n = 0 , -- often zero -- 0.00 to 0.50 for typical minerals -- 4.00 for some cases -- -5 for 1 case seg_incl_dev = 0.6 , -- 0.6 is a typical mineral value -- 2.00 for lava seg_length_n = 4 , -- 2 to 8 for rare -- 15 for common seg_length_dev = 1 , -- Often 1 or 6 size_n = 8 , -- 3 to 10 for many -- 54 for stone_with_coal -- 100 for air size_dev = 4 , -- 0.25 to 0.50 of size_n forkturnangle = 57 , turnangle = 57 , num_per_block = 8 , -- 20 for common num_branches_n = 2 , num_branches_dev = 1 , fork_chance = 0.1 , mothersize_n = 0 , mothersize_dev = 0 , } -- =================================================================== local make_new_ore = function (seed_diff, nodename) if ocutil.node_missing (nodename) then earthgen.debug_log ("ore missing: " .. nodename) return nil else earthgen.debug_log ("ore present: " .. nodename) end local new_def = ocutil.clone_table (proto_ore_def) new_def.name = nodename new_def.seed_diff = seed_diff return new_def end -- =================================================================== local ore_id = 5000 -- =================================================================== ore_def = make_new_ore (ore_id, "rhodochrosite:mineral_rhodochrosite" ) if ore_def ~= nil then ore_def.num_per_block = 15 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "nftools:stone_with_amber" ) if ore_def ~= nil then ore_def.num_per_block = 5 ore_def.seg_length_n = 6 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "nftools:stone_with_bismuth" ) if ore_def ~= nil then ore_def.num_per_block = 6 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "nftools:stone_with_blackopal" ) if ore_def ~= nil then ore_def.num_per_block = 6 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "nftools:stone_with_turquoise" ) if ore_def ~= nil then ore_def.num_per_block = 6 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "aluminum:ore" ) if ore_def ~= nil then ore_def.num_per_block = 6 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end -- =================================================================== ore_def = make_new_ore (ore_id, "emeralds:ore" ) if ore_def ~= nil then ore_def.num_per_block = 10 ore_def.seg_length_n = 8 ore_def.size_n = 10 ore_def.size_dev = 5 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "quartz:ore" ) if ore_def ~= nil then ore_def.num_per_block = 6 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== ore_def = make_new_ore (ore_id, "titanium:ore" ) if ore_def ~= nil then ore_def.num_per_block = 10 ore_def.seg_length_n = 8 earthgen.register_ore (ore_def) end ore_id = ore_id + 1 -- =================================================================== local earthgen_glowstones = ocutil.numset ("earthgen_glowstones") or 1500 if earthgen_glowstones < 0 then earthgen_glowstones = 0 end if earthgen_glowstones > 2500 then earthgen_glowstones = 2500 end if earthgen_glowstones > 0 then ore_def = make_new_ore (ore_id, "glowstone:glowstone" ) if ore_def ~= nil then ore_def.num_per_block = earthgen_glowstones ore_def.seg_length_n = 1 ore_def.seg_length_dev = 0 ore_def.num_branches_n = 0 ore_def.num_branches_dev = 0 ore_def.size_n = 1 ore_def.size_dev = 0 earthgen.register_ore (ore_def) end end ore_id = ore_id + 1 -- =================================================================== -- End of file