From 9ffbbf4c0ed89078a8411e29a3de45aad8034205 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 10 Dec 2014 10:51:27 +0000 Subject: Update: added check for unloaded map --- soil.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'soil.lua') diff --git a/soil.lua b/soil.lua index b459273..e1863bc 100644 --- a/soil.lua +++ b/soil.lua @@ -44,6 +44,11 @@ minetest.register_abm({ minetest.set_node(pos, {name="default:dirt"}) end + -- if map around soil not loaded then skip until loaded + if minetest.find_node_near(pos, 3, {"ignore"}) then + return + end + -- check if there is water nearby and change soil accordingly if minetest.find_node_near(pos, 3, {"group:water"}) then if node.name == "farming:soil" then -- cgit v1.2.3