1
0
Fork 0

Fix raid instawin when no spawnable blocks found

release/0.81.1
cora 2022-11-17 05:47:48 +01:00
parent 057a78ed30
commit db4f9ec5a3
2 changed files with 6 additions and 1 deletions

View File

@ -91,7 +91,10 @@ function check_events(dtime)
local p = ae:cond_progress()
if p == true then
ae.stage = ae.stage + 1
ae:on_stage_begin()
if ae:on_stage_begin() == true then
mcl_log("[mcl_events] Event "..ae.readable_name.." at "..minetest.pos_to_string(vector.round(ae.pos)).." failed at stage_begin of stage "..ae.stage )
active_events[idx] = nil
end
elseif tonumber(p) then
ae.stage = tonumber(p) or ae.stage + 1
ae:on_stage_begin()

View File

@ -187,12 +187,14 @@ function mcl_raids.spawn_raid(event)
mcl_raids.promote_to_raidcaptain(event.mobs[1])
end
minetest.log("action", "[mcl_raids] Raid Spawned. Illager Count: " .. #event.mobs .. ".")
return #event.mobs == 0
else
minetest.log("action", "[mcl_raids] Raid Spawn Postion not chosen.")
end
elseif not sn then
minetest.log("action", "[mcl_raids] Raid Spawn Position error, no appropriate site found.")
end
return true
end
function mcl_raids.find_villager(pos)