summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-11-02 14:38:16 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2018-11-02 14:38:16 +0000
commit5665c806576f3964b71264637571f8ae563f9d4e (patch)
treed62be6ff7ff10d5fa5875ed09fb2620df882c24d
parent16bcdb0adfe79654d65589c02627963e9ed096f9 (diff)
blue agave needs light to spread, increased spread chance valueorigin/masterorigin/HEAD
-rw-r--r--init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index e74fd34..565262c 100644
--- a/init.lua
+++ b/init.lua
@@ -276,9 +276,14 @@ minetest.register_abm({
nodenames = {"wine:blue_agave"},
neighbors = {"default:desert_sand"},
interval = 17,
- chance = 33,
+ chance = 76,
action = function(pos, node)
+ local light = minetest.get_node_light(pos)
+ if not light or light < 13 then
+ return
+ end
+
local n = minetest.find_nodes_in_area_under_air(
{x = pos.x + 2, y = pos.y + 1, z = pos.z + 2},
{x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},