mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Used a deffered generation of 2 seconds for cherry trees
- (hopefully) Solves #92
This commit is contained in:
parent
251661fb52
commit
aa0c132570
@ -366,7 +366,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local p_pos = area:index(x,y,z)
|
local p_pos = area:index(x,y,z)
|
||||||
local content_id = data[p_pos]
|
local content_id = data[p_pos]
|
||||||
if content_id == c_mg_cherry_sapling then
|
if content_id == c_mg_cherry_sapling then
|
||||||
default.grow_cherry_tree({x=x, y=y, z=z}, false, "default:cherry_tree", "default:cherry_blossom_leaves")
|
minetest.after(1, default.grow_cherry_tree,
|
||||||
|
{x=x, y=y, z=z},
|
||||||
|
false,
|
||||||
|
"default:cherry_tree",
|
||||||
|
"default:cherry_blossom_leaves")
|
||||||
trees_grown = trees_grown + 1
|
trees_grown = trees_grown + 1
|
||||||
else
|
else
|
||||||
-- nope
|
-- nope
|
||||||
@ -375,7 +379,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local geninfo = string.format(" trees grown after: %.2fs", os.clock() - timer)
|
local geninfo = string.format(" trees grown after: %.2fs", os.clock() - timer)
|
||||||
print (trees_grown..geninfo)
|
minetest.log("action", trees_grown..geninfo)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function default.grow_cherry_tree(pos, is_apple_tree, trunk_node, leaves_node)
|
function default.grow_cherry_tree(pos, is_apple_tree, trunk_node, leaves_node)
|
||||||
|
Loading…
Reference in New Issue
Block a user