-- naturally growing trees -- rnd, 2015 -- local TREE_SIZE = 20; -- local TRUNK_SIZE = 4; -- local BRANCH_LENGTH = 10.; local TREE_SIZE = 40; local TRUNK_SIZE = 5; local BRANCH_LENGTH = 10; minetest.register_node("lib_ecology:tree_worldtree", { description = "naturally growing tree", tiles = {"lib_ecology_tree_default_trunk.png"}, is_ground_content = true, groups = {cracky=3, stone=1}, drop = 'lib_ecology:tree_default_trunk', after_place_node = function(pos, placer, itemstack, pointed_thing) local meta = minetest.get_meta(pos); meta:set_string("infotext","growth started"); meta:set_int("life",TREE_SIZE); meta:set_int("branch",0); end }) minetest.register_abm({ nodenames = {"lib_ecology:tree_worldtree"}, neighbors = {"air"}, interval = 1.0, chance = 2, action = function(pos, node, active_object_count, active_object_count_wider) local meta = minetest.get_meta(pos); local life = meta:get_int("life"); local branch = meta:get_int("branch"); minetest.set_node(pos, {name = "lib_ecology:tree_default_trunk"}); -- LEAVES if life<=0 or (life