summaryrefslogtreecommitdiff
path: root/mushroom.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mushroom.lua')
-rw-r--r--mushroom.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/mushroom.lua b/mushroom.lua
index 39e14d2..8de756a 100644
--- a/mushroom.lua
+++ b/mushroom.lua
@@ -59,14 +59,16 @@ minetest.register_abm({
action = function(pos, node)
if minetest.get_node_light(pos, nil) > 14 then
+
minetest.remove_node(pos)
+
return
end
local random = {
- x = pos.x + math.random(-2,2),
- y = pos.y + math.random(-1,1),
- z = pos.z + math.random(-2,2)
+ x = pos.x + math.random(-2, 2),
+ y = pos.y + math.random(-1, 1),
+ z = pos.z + math.random(-2, 2)
}
local random_node = minetest.get_node_or_nil(random)