Set raiders on path to village after spawn

This commit is contained in:
cora 2022-11-03 19:00:17 +01:00
parent 9893dee1aa
commit ae90cbe3ef

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