1
0
Fork 0

Set raiders on path to village after spawn

release/0.81.1
cora 2022-11-03 19:00:17 +01:00
parent 9893dee1aa
commit ae90cbe3ef
1 changed files with 3 additions and 1 deletions

View File

@ -62,11 +62,13 @@ function mcl_raids.spawn_raid(event)
end
for m,c in pairs(w) do
for i=1,c do
local mob = mcl_mobs.spawn(spawn_pos,m)
local p = vector.offset(spawn_pos,0,1,0)
local mob = mcl_mobs.spawn(p,m)
local l = mob:get_luaentity()
if l then
event.health_max = event.health_max + l.health
table.insert(event.mobs,mob)
mcl_mobs:gopath(l,pos)
end
end
end