summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@linux-forks.de>2018-11-02 12:24:49 +0100
committerroot <root@linux-forks.de>2018-11-02 12:24:49 +0100
commit4c911558ed46382bdba776a24f1c41559686c12f (patch)
tree81c6857ece8d1b9554bd04a500e53b3bd7464014
parent87e783dc3b0b9db84205064e712eeedbdcbf79c3 (diff)
parent16bcdb0adfe79654d65589c02627963e9ed096f9 (diff)
Merge branch 'master' of https://notabug.org/TenPlus1/wine
-rw-r--r--init.lua18
1 files changed, 11 insertions, 7 deletions
diff --git a/init.lua b/init.lua
index b28688e..c3d1aa1 100644
--- a/init.lua
+++ b/init.lua
@@ -265,29 +265,33 @@ minetest.register_decoration({
fill_ratio = 0.001,
biomes = {"desert"},
decoration = {"wine:blue_agave"},
+ y_min = 15,
+ y_max = 50,
+ spawn_by = "default:desert_sand",
+ num_spawn_by = 6,
})
minetest.register_abm({
label = "Blue Agave growth",
nodenames = {"wine:blue_agave"},
+ neighbors = {"default:desert_sand"},
interval = 17,
chance = 33,
action = function(pos, node)
- local n = minetest.find_nodes_in_area(
- {x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
+ 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},
{"wine:blue_agave"})
- if #n > 3 then
- -- needs to have 2 neighbors or less to propagate (3 = +itself)
+ if #n > 2 then
return
end
- -- find desert sand with air above
+ -- find desert sand with air above (grow across and down only)
n = minetest.find_nodes_in_area_under_air(
- {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
- {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
+ {x = pos.x + 1, y = pos.y - 1, z = pos.z + 1},
+ {x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
{"default:desert_sand"})
-- place blue agave