Fix raid instawin when no spawnable blocks found
parent
057a78ed30
commit
db4f9ec5a3
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue