Default/mapgen: Clean up ore registrations
authorparamat <mat.gregory@virginmedia.com>
Sat, 2 Jul 2016 03:10:29 +0000 (04:10 +0100)
committerparamat <mat.gregory@virginmedia.com>
Tue, 5 Jul 2016 17:16:52 +0000 (18:16 +0100)
Re-order registrations
Add and improve comments
Change sand blob ymax to 0 as sand does not always rise above 0
Remove dirt blobs from sandstone as it is unsuitable for
many sandstone biomes and ugly in stony sandstone desert
Change ymax of first iron region to 0

mods/default/mapgen.lua

index c84aa7b42e35031c710c9add809df708866466ca..7e8032054b6ada36b6b85620b9cf0091b58c6f3d 100644 (file)
@@ -42,12 +42,12 @@ minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebr
 -- Register ores
 --
 
--- All mapgens except singlenode
--- Blob ore first to avoid other ores inside blobs
-
 function default.register_ores()
+       -- Blob ores
+       -- These first to avoid other ores in blobs
 
        -- Clay
+       -- This first to avoid clay in sand blobs
 
        minetest.register_ore({ 
                ore_type        = "blob",
@@ -78,7 +78,7 @@ function default.register_ores()
                clust_scarcity  = 16 * 16 * 16,
                clust_size      = 5,
                y_min           = -31,
-               y_max           = 4,
+               y_max           = 0,
                noise_threshold = 0.0,
                noise_params    = {
                        offset = 0.5,
@@ -95,7 +95,7 @@ function default.register_ores()
        minetest.register_ore({
                ore_type        = "blob",
                ore             = "default:dirt",
-               wherein         = {"default:stone", "default:sandstone"},
+               wherein         = {"default:stone"},
                clust_scarcity  = 16 * 16 * 16,
                clust_size      = 5,
                y_min           = -31,
@@ -132,6 +132,8 @@ function default.register_ores()
                },
        })
 
+       -- Scatter ores
+
        -- Coal
 
        minetest.register_ore({
@@ -166,7 +168,7 @@ function default.register_ores()
                clust_num_ores = 3,
                clust_size     = 2,
                y_min          = -15,
-               y_max          = 2,
+               y_max          = 0,
        })
 
        minetest.register_ore({
@@ -202,48 +204,61 @@ function default.register_ores()
                y_max          = -64,
        })
 
-       --Mese
+       -- Copper
 
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:stone_with_mese",
+               ore            = "default:stone_with_copper",
                wherein        = "default:stone",
-               clust_scarcity = 18 * 18 * 18,
-               clust_num_ores = 3,
-               clust_size     = 2,
-               y_min          = -255,
-               y_max          = -64,
+               clust_scarcity = 12 * 12 * 12,
+               clust_num_ores = 4,
+               clust_size     = 3,
+               y_min          = -63,
+               y_max          = -16,
        })
 
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:stone_with_mese",
+               ore            = "default:stone_with_copper",
                wherein        = "default:stone",
-               clust_scarcity = 14 * 14 * 14,
+               clust_scarcity = 9 * 9 * 9,
                clust_num_ores = 5,
                clust_size     = 3,
                y_min          = -31000,
-               y_max          = -256,
+               y_max          = -64,
        })
 
+       -- Gold
+
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:mese",
+               ore            = "default:stone_with_gold",
                wherein        = "default:stone",
-               clust_scarcity = 36 * 36 * 36,
+               clust_scarcity = 15 * 15 * 15,
                clust_num_ores = 3,
                clust_size     = 2,
+               y_min          = -255,
+               y_max          = -64,
+       })
+
+       minetest.register_ore({
+               ore_type       = "scatter",
+               ore            = "default:stone_with_gold",
+               wherein        = "default:stone",
+               clust_scarcity = 13 * 13 * 13,
+               clust_num_ores = 5,
+               clust_size     = 3,
                y_min          = -31000,
-               y_max          = -1024,
+               y_max          = -256,
        })
 
-       -- Gold
+       -- Mese crystal
 
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:stone_with_gold",
+               ore            = "default:stone_with_mese",
                wherein        = "default:stone",
-               clust_scarcity = 15 * 15 * 15,
+               clust_scarcity = 18 * 18 * 18,
                clust_num_ores = 3,
                clust_size     = 2,
                y_min          = -255,
@@ -252,9 +267,9 @@ function default.register_ores()
 
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:stone_with_gold",
+               ore            = "default:stone_with_mese",
                wherein        = "default:stone",
-               clust_scarcity = 13 * 13 * 13,
+               clust_scarcity = 14 * 14 * 14,
                clust_num_ores = 5,
                clust_size     = 3,
                y_min          = -31000,
@@ -285,28 +300,17 @@ function default.register_ores()
                y_max          = -256,
        })
 
-       -- Copper
+       -- Mese block
 
        minetest.register_ore({
                ore_type       = "scatter",
-               ore            = "default:stone_with_copper",
-               wherein        = "default:stone",
-               clust_scarcity = 12 * 12 * 12,
-               clust_num_ores = 4,
-               clust_size     = 3,
-               y_min          = -63,
-               y_max          = -16,
-       })
-
-       minetest.register_ore({
-               ore_type       = "scatter",
-               ore            = "default:stone_with_copper",
+               ore            = "default:mese",
                wherein        = "default:stone",
-               clust_scarcity = 9 * 9 * 9,
-               clust_num_ores = 5,
-               clust_size     = 3,
+               clust_scarcity = 36 * 36 * 36,
+               clust_num_ores = 3,
+               clust_size     = 2,
                y_min          = -31000,
-               y_max          = -64,
+               y_max          = -1024,
        })
 end