From 3777c785458514f6b18237b772ca50100247186f Mon Sep 17 00:00:00 2001 From: cale Date: Tue, 12 Apr 2016 19:23:23 +0200 Subject: [PATCH] fixed farming bug --- mods/farming/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/farming/init.lua b/mods/farming/init.lua index 08c277b..0b7406b 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -120,7 +120,9 @@ minetest.register_abm({ chance = 5, action = function(pos, node, active_object_count, active_object_count_wider) pos.y = pos.y + 1 - minetest.set_node(pos, {name = "farming:sugarcane"}) + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:sugarcane"}) + end end, }) @@ -152,7 +154,9 @@ minetest.register_abm({ chance = 2, action = function(pos, node, active_object_count, active_object_count_wider) pos.y = pos.y + 1 - minetest.set_node(pos, {name = "farming:cactus"}) + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:cactus"}) + end end, })