merge beacon-branch into fork beacon branch #7

Merged
chmodsayshello merged 453 commits from VoxeLibre/VoxeLibre:beacons into beacon-"fork" 2022-07-23 11:30:49 +02:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit df2934c548 - Show all commits

View File

@ -388,6 +388,10 @@ end
local function spawn_group(p,mob,spawn_on,group_max)
local nn = minetest.find_nodes_in_area(vector.offset(p,-3,-3,-3),vector.offset(p,3,3,3),spawn_on)
if not nn or #nn < 1 then
nn = {}
table.insert(nn,p)
end
for i = 1, math.random(group_max) do
minetest.add_entity(nn[math.random(#nn)],mob)
end