mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-11 04:03:15 +01:00
fix single mob spawning and poutpost walls
This commit is contained in:
parent
f324e150ea
commit
d393e6a181
@ -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)
|
local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon)
|
||||||
table.shuffle(sp)
|
table.shuffle(sp)
|
||||||
for i,node in pairs(sp) do
|
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)
|
local pos = vector.offset(node,0,1,0)
|
||||||
if pos then
|
if pos then
|
||||||
minetest.add_entity(pos,mob)
|
minetest.add_entity(pos,mob)
|
||||||
|
@ -60,8 +60,9 @@ mcl_structures.register_structure("pillager_outpost",{
|
|||||||
after_place = function(p,def,pr)
|
after_place = function(p,def,pr)
|
||||||
local p1 = vector.offset(p,-7,0,-7)
|
local p1 = vector.offset(p,-7,0,-7)
|
||||||
local p2 = vector.offset(p,7,14,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: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
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user