diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2019-05-22 21:20:46 -0400 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2019-05-22 21:20:46 -0400 |
commit | ea9e0c62c9b3c02a3cf31696c567abc879012798 (patch) | |
tree | 309a43f3331ce3ee52fa6a6865791b947f79fff7 /farming/soil.lua | |
parent | 14117cdce080e1eea630363705c6962f716049fe (diff) | |
download | dreambuilder_modpack-ea9e0c62c9b3c02a3cf31696c567abc879012798.tar dreambuilder_modpack-ea9e0c62c9b3c02a3cf31696c567abc879012798.tar.gz dreambuilder_modpack-ea9e0c62c9b3c02a3cf31696c567abc879012798.tar.bz2 dreambuilder_modpack-ea9e0c62c9b3c02a3cf31696c567abc879012798.tar.xz dreambuilder_modpack-ea9e0c62c9b3c02a3cf31696c567abc879012798.zip |
update biome_lib, coloredwood, extra_stairsplus, farming redo,
moreblocks, moretrees, plantlife, and ropes
Diffstat (limited to 'farming/soil.lua')
-rw-r--r-- | farming/soil.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/farming/soil.lua b/farming/soil.lua index 0b4844a..d379f5d 100644 --- a/farming/soil.lua +++ b/farming/soil.lua @@ -52,7 +52,14 @@ minetest.register_abm({ end -- check if there is water nearby and change soil accordingly - if minetest.find_node_near(pos, 3, {"group:water"}) then +-- if minetest.find_node_near(pos, 3, {"group:water"}) then + + -- check if water is within 3 nodes horizontally and 1 below + if #minetest.find_nodes_in_area( + {x = pos.x + 3, y = pos.y - 1, z = pos.z + 3}, + {x = pos.x - 3, y = pos.y , z = pos.z - 3}, + {"group:water"}) > 0 then + if node.name == "farming:soil" then minetest.set_node(pos, {name = "farming:soil_wet"}) end @@ -64,4 +71,4 @@ minetest.register_abm({ minetest.set_node(pos, {name = "default:dirt"}) end end, -})
\ No newline at end of file +}) |