summaryrefslogtreecommitdiff
path: root/corn.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 11:52:27 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 11:52:27 -0700
commitc686740080b5a95bd9f15544bb09fad60d0e10d7 (patch)
tree9db50af2e8b050072029b24154935c24e28eb5c5 /corn.lua
parentacd6cf5db5d044d36f48604eb35d6675a2080f81 (diff)
I make this mistake a lot... Get proper name from node.
Diffstat (limited to 'corn.lua')
-rw-r--r--corn.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/corn.lua b/corn.lua
index a5a4d00..9224bb0 100644
--- a/corn.lua
+++ b/corn.lua
@@ -138,12 +138,12 @@ 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
+ if minetest.get_node(above).name == "crops:corn_top_1" or minetest.get_node(above).name == "crops:corn_top_2" then
minetest.remove_node(above)
minetest.remove_node(pos)
return
end
- if not minetest.get_node(above) == "crops:corn_top_3" then
+ if not minetest.get_node(above).name == "crops:corn_top_3" then
minetest.remove_node(pos)
end