1
0
Fork 0

Mobs now can spawn in multiple positions around you per spawning cycle

This commit is contained in:
ancientmarinerdev 2023-01-27 04:08:38 +00:00 committed by Gitea
parent b5c0830060
commit c2ac33ac61
1 changed files with 9 additions and 0 deletions

View File

@ -816,6 +816,8 @@ if mobs_spawn then
local spawning_position = find_spawning_position(pos) local spawning_position = find_spawning_position(pos)
if not spawning_position then if not spawning_position then
-- TODO do we log to user, or try again. How many times do we try again.
--mcl_log("abandon this")
return return
end end
@ -903,6 +905,13 @@ if mobs_spawn then
if spawned then if spawned then
--mcl_log("We have spawned") --mcl_log("We have spawned")
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("type", pos) mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("type", pos)
local new_spawning_position = find_spawning_position(pos)
if new_spawning_position then
mcl_log("Setting new spawning position")
spawning_position = new_spawning_position
else
mcl_log("Cannot set new spawning position")
end
end end
end end