mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 17:41:06 +01:00
emerge before geode and surface pool placement
otherwise they can be cut off
This commit is contained in:
parent
ef14006f15
commit
6ad00e4170
2 changed files with 86 additions and 78 deletions
|
@ -17,6 +17,8 @@ local function makegeode(pos,def,pr)
|
|||
local size = pr:next(5,7)
|
||||
local p1 = vector.offset(pos,-size,-size,-size)
|
||||
local p2 = vector.offset(pos,size,size,size)
|
||||
minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param)
|
||||
if calls_remaining ~= 0 then return end
|
||||
local calcite = {}
|
||||
local nn = minetest.find_nodes_in_area(p1,p2,{"group:material_stone"})
|
||||
table.sort(nn,function(a, b)
|
||||
|
@ -62,6 +64,8 @@ local function makegeode(pos,def,pr)
|
|||
end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
return true
|
||||
end
|
||||
|
||||
mcl_structures.register_structure("geode",{
|
||||
|
|
|
@ -33,6 +33,8 @@ local function makelake(pos,size,liquid,placein,border,pr)
|
|||
local node_under = minetest.get_node(vector.offset(pos,0,-1,0))
|
||||
local p1 = vector.offset(pos,-size,-1,-size)
|
||||
local p2 = vector.offset(pos,size,-1,size)
|
||||
minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param)
|
||||
if calls_remaining ~= 0 then return end
|
||||
local nn = minetest.find_nodes_in_area(p1,p2,placein)
|
||||
table.sort(nn,function(a, b)
|
||||
return vector.distance(vector.new(pos.x,0,pos.z), a) < vector.distance(vector.new(pos.x,0,pos.z), b)
|
||||
|
@ -79,6 +81,8 @@ local function makelake(pos,size,liquid,placein,border,pr)
|
|||
minetest.bulk_set_node(br,{name=border})
|
||||
minetest.bulk_set_node(air,{name="air"})
|
||||
return true
|
||||
end)
|
||||
return true
|
||||
end
|
||||
|
||||
mcl_structures.register_structure("lavapool",{
|
||||
|
|
Loading…
Reference in a new issue