diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2015-12-13 10:30:17 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2015-12-13 10:30:17 +0000 |
commit | 3a25e79efe1203ea6b37e19b337e94662b641561 (patch) | |
tree | 12e5496dd2bc0ba9aedbddcdf4cb6bde593f3981 | |
parent | 0ec560b31a69f70a59256efb99158e47cb03b6a4 (diff) |
Fire Flowers spread
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | flowers.lua | 28 | ||||
-rw-r--r-- | init.lua | 2 |
3 files changed, 29 insertions, 2 deletions
@@ -16,6 +16,7 @@ Ethereal v7 Mapgen mod for Minetest - Dirt with dry grass turns into green grass when near water - Ice or snow above sea level melts into river water - Disabling ethereal biomes no longer shows error messages +- Fire Flowers re-generate, can also be made into Fire Dust ### 1.18 diff --git a/flowers.lua b/flowers.lua index df3646e..21c6dcc 100644 --- a/flowers.lua +++ b/flowers.lua @@ -3,7 +3,7 @@ minetest.register_abm({ nodenames = {"group:flora"}, neighbors = {"group:soil"}, interval = 25, - chance = 10, + chance = 15, catch_up = false, action = function(pos, node) @@ -45,6 +45,32 @@ minetest.register_abm({ return + elseif num > 3 + and node.name == "ethereal:dry_shrub" then + + local grass = minetest.find_nodes_in_area_under_air( + pos0, pos1, {"ethereal:dry_shrub"}) + + local fflower = minetest.find_nodes_in_area_under_air( + pos0, pos1, {"ethereal:fire_flower"}) + + if #grass > 4 + and #fflower < 1 then + + grass = grass[math.random(#grass)] + + grass.y = grass.y - 1 + + if minetest.get_node(grass).name == "ethereal:fiery_dirt" then + + grass.y = grass.y + 1 + + minetest.set_node(grass, {name = "ethereal:fire_flower"}) + end + end + + return + elseif num > 3 then return end @@ -1,6 +1,6 @@ --[[
- Minetest Ethereal Mod 1.19 (3rd December 2015)
+ Minetest Ethereal Mod 1.19 (13th December 2015)
Created by ChinChow
|