mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
fix single mob spawning and poutpost walls
This commit is contained in:
parent
f324e150ea
commit
d393e6a181
2 changed files with 3 additions and 2 deletions
|
@ -232,7 +232,7 @@ function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n)
|
|||
local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon)
|
||||
table.shuffle(sp)
|
||||
for i,node in pairs(sp) do
|
||||
if not peaceful and i < n then
|
||||
if not peaceful and i <= n then
|
||||
local pos = vector.offset(node,0,1,0)
|
||||
if pos then
|
||||
minetest.add_entity(pos,mob)
|
||||
|
|
|
@ -60,8 +60,9 @@ mcl_structures.register_structure("pillager_outpost",{
|
|||
after_place = function(p,def,pr)
|
||||
local p1 = vector.offset(p,-7,0,-7)
|
||||
local p2 = vector.offset(p,7,14,7)
|
||||
mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
|
||||
mcl_structures.spawn_mobs("mobs_mc:evoker",spawnon,p1,p2,pr,1)
|
||||
mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
|
||||
mcl_structures.construct_nodes(p1,p2,{"group:wall"})
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue