summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-02-01 22:59:05 -0800
committerAuke Kok <auke-jan.h.kok@intel.com>2015-02-01 22:59:05 -0800
commitb3c1b160231bd223fddcd26267b2266fce56d6d8 (patch)
tree35d56dc62672559dbca77beb013fae3b7101f0a6 /init.lua
parent6f3d6d3f1e8ab3fa5d04f8036371c9ff25d86fb0 (diff)
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.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
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