made thistles grow

This commit is contained in:
kaadmy 2015-11-05 12:53:55 -08:00
parent 78bd353d05
commit de6f265786
1 changed files with 20 additions and 0 deletions

View File

@ -319,6 +319,26 @@ minetest.register_abm( -- papyrus grows
end,
})
minetest.register_abm( -- papyrus grows
{
nodenames = {"default:papyrus"},
neighbors = {"group:plantable_soil"},
interval = 20,
chance = 30,
action = function(pos, node)
local height = 0
while minetest.get_node(pos).name == "default:thistle" and height < 3 do
height = height+1
pos.y = pos.y+1
end
if height < 3 then
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name="default:thistle"})
end
end
end,
})
--[[ TORCH FLAME IS VERY, VERY SLOW, THERE ARE NOW ANIMATIONS INSTEAD
minetest.register_abm( -- torch flame
{