Don't generate terrain before dungeon.
This commit is contained in:
parent
77a6129e00
commit
be7d7a1976
4 changed files with 65 additions and 20 deletions
|
@ -287,6 +287,15 @@ local wood_noise = {offset = 0, scale = 1, seed = -4640, spread = {x = 32, y = 3
|
|||
--interest['fun_caves:tree_mineral'] = true
|
||||
|
||||
|
||||
fun_caves.is_tree = function(minp)
|
||||
local tree_n = minetest.get_perlin(tree_noise_1):get2d({x=math.floor((minp.x + 32) / 160) * 80, y=math.floor((minp.z + 32) / 160) * 80})
|
||||
if not tree_n or minp.y < -112 or minp.y > 208 or (not fun_caves.DEBUG and tree_n < 1.5) then
|
||||
return
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
|
||||
if not (minp and maxp and data and p2data and area and node and type(data) == 'table' and type(p2data) == 'table') then
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue