1
0
Fork 0

struct-api: export construct_nodes function

pvp_knockback
cora 2022-10-15 03:39:27 +02:00
parent 7f2ecb6ed0
commit 7fee2cd55a
1 changed files with 6 additions and 2 deletions

View File

@ -30,13 +30,17 @@ local function generate_loot(pos, def, pr)
if def.loot then mcl_structures.fill_chests(p1,p2,def.loot,pr) end
end
local function construct_nodes(pos,def,pr)
local nn = minetest.find_nodes_in_area(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2),def.construct_nodes)
function mcl_structures.construct_nodes(p1,p2,nodes)
local nn=minetest.find_nodes_in_area(p1,p2,nodes)
for _,p in pairs(nn) do
mcl_structures.init_node_construct(p)
end
end
local function construct_nodes(pos,def,pr)
return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2))
end
function mcl_structures.find_lowest_y(pp)
local y = 31000