From 51fce37fc195e7db58bf0ba272659d7c3f3d105c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 7 Apr 2012 19:45:40 +0300 Subject: [PATCH] Tune cactus generation --- mods/default/mapgen.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index e6e08c79..e7663f2a 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -151,9 +151,9 @@ minetest.register_on_generated(function(minp, maxp, seed) end end -- Generate cactuses - local perlin1 = minetest.env:get_perlin(230, 3, 0.7, 100) + local perlin1 = minetest.env:get_perlin(230, 3, 0.6, 100) -- Assume X and Z lengths are equal - local divlen = 8 + local divlen = 16 local divs = (maxp.x-minp.x)/divlen+1; for divx=0,divs-1 do for divz=0,divs-1 do @@ -162,7 +162,7 @@ minetest.register_on_generated(function(minp, maxp, seed) local x1 = minp.x + math.floor((divx+1)*divlen) local z1 = minp.z + math.floor((divz+1)*divlen) -- Determine cactus amount from perlin noise - local cactus_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 6 - 5) + local cactus_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 6 - 3) -- Find random positions for cactus based on this random local pr = PseudoRandom(seed+1) for i=0,cactus_amount do