From b3c1b160231bd223fddcd26267b2266fce56d6d8 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sun, 1 Feb 2015 22:59:05 -0800 Subject: Stop upward sand creep in deserts. This is an extreme measure to stop upward sand creep in non-deserts. If there isn't some sand already at the same elevation as the eroding dirt, don't erode it to sand. This prevents beaches slowly crawling up entire hills. This is needed since there is no biome information yet in Minetest. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index d1456cb..c134375 100644 --- a/init.lua +++ b/init.lua @@ -412,7 +412,7 @@ local function sed() if node.name == "default:dirt" and underliquid < 1 then -- since we don't have biome information, we'll assume that if there is no sand or -- desert sand anywhere nearby, we shouldn't degrade this block further - local fpos = minetest.find_node_near(pos, 2, {"default:sand", "default:desert_sand"}) + local fpos = minetest.find_node_near({x = pos.x, y = pos.y + 1, z = pos.z}, 1, {"default:sand", "default:desert_sand"}) if not fpos then return end -- cgit v1.2.3