summaryrefslogtreecommitdiff
path: root/corn.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 11:45:01 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 11:45:01 -0700
commitd9e83d0e40d7c755b3a1f019430897b7343df43f (patch)
treed8f59a64a75f27ac196261fefe8e0c14af5921d6 /corn.lua
parent25f37fbd0d92ca4960d97cf7fcaab155cfa5f789 (diff)
Also break non-ripe tops properly.
Diffstat (limited to 'corn.lua')
-rw-r--r--corn.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/corn.lua b/corn.lua
index b224e70..a29d96a 100644
--- a/corn.lua
+++ b/corn.lua
@@ -138,6 +138,9 @@ minetest.register_node("crops:corn_base_2", {
drop = {},
on_dig = function(pos, node, digger)
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
+ if minetest.get_node(above) == "crops:corn_top_1" or minetest.get_node(above) == "crops:corn_top_2" then
+ minetest.remove_node(above)
+ end
if not minetest.get_node(above) == "crops:corn_top_3" then
minetest.remove_node(pos)
end