From 44505e228260ce740f5ef3da895546ed188ad94c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Fri, 10 Apr 2015 16:41:48 -0700 Subject: restrict all of these crops from growing if they're not on soil --- corn.lua | 4 ++++ melon.lua | 2 ++ 2 files changed, 6 insertions(+) diff --git a/corn.lua b/corn.lua index b74a79b..925f3f0 100644 --- a/corn.lua +++ b/corn.lua @@ -84,6 +84,7 @@ minetest.register_node("crops:corn_base_seed", { minetest.register_abm({ nodenames = { "crops:corn_base_seed" }, + neighbors = { "group:soil" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) @@ -110,6 +111,7 @@ minetest.register_node("crops:corn_base_1", { minetest.register_abm({ nodenames = { "crops:corn_base_1" }, + neighbors = { "group:soil" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) @@ -202,6 +204,7 @@ minetest.register_node("crops:corn_top_1", { minetest.register_abm({ nodenames = { "crops:corn_top_1" }, + neighbors = { "crops:corn_base_2" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) @@ -236,6 +239,7 @@ minetest.register_node("crops:corn_top_2", { minetest.register_abm({ nodenames = { "crops:corn_top_2" }, + neighbors = { "crops:corn_base_2" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) diff --git a/melon.lua b/melon.lua index 52840c3..8860dde 100644 --- a/melon.lua +++ b/melon.lua @@ -136,6 +136,7 @@ minetest.register_node("crops:melon", { -- minetest.register_abm({ nodenames = { "crops:melon_plant_1", "crops:melon_plant_2", "crops:melon_plant_3","crops:melon_plant_4" }, + neighbors = { "group:soil" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) @@ -155,6 +156,7 @@ minetest.register_abm({ -- minetest.register_abm({ nodenames = { "crops:melon_plant_5" }, + neighbors = { "group:soil" }, interval = interval, chance = chance, action = function(pos, node, active_object_count, active_object_count_wider) -- cgit v1.2.3