summaryrefslogtreecommitdiff
path: root/corn.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 16:41:48 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 16:41:48 -0700
commit44505e228260ce740f5ef3da895546ed188ad94c (patch)
tree8bc140453adbaa34994bb186cbe30c137dab148f /corn.lua
parentc80f2534322e0cc74df533c067c8d379508820a0 (diff)
restrict all of these crops from growing if they're not on soil
Diffstat (limited to 'corn.lua')
-rw-r--r--corn.lua4
1 files changed, 4 insertions, 0 deletions
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)