From 237541789b20ade4043b42e3799fee13292c1ac6 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Sep 2017 05:49:24 +0200 Subject: [PATCH] Spawn fossils in fixed height range --- mods/MAPGEN/mcl_mapgen_core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index b14c362a9d..eccabb86ad 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -1050,8 +1050,8 @@ minetest.register_on_generated(function(minp, maxp, seed) local fossil_prob = 64 * (((maxp.x-minp.x+1)*(maxp.z-minp.z+1)) / 256) if math.random(1, fossil_prob) == 1 then - -- Spawn fossil below desert surface - local p1 = {x=p.x, y=p.y-math.random(15, 24), z=p.z} + -- Spawn fossil below desert surface between layers 40 and 49 + local p1 = {x=p.x, y=math.random(mcl_util.layer_to_y(40), mcl_util.layer_to_y(49)), z=p.z} -- Very rough check of the environment (we expect to have enough stonelike nodes). -- Fossils may still appear partially exposed in caves, but this is O.K. local p2 = vector.add(p1, 4)