diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-01-21 14:59:28 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-01-21 14:59:28 +0000 |
commit | 87031b60518731f62dbce0ffb1601b0c34d506c9 (patch) | |
tree | 707258c7ca090302fbbc7114966d551c849881da /mushroom.lua | |
parent | bd0fae584c0b0c3a04d41608acb4dfaf77554d91 (diff) |
Optimize code, allfaces leaves by default, leaves walkable by default
Diffstat (limited to 'mushroom.lua')
-rw-r--r-- | mushroom.lua | 8 |
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)
|