mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-15 04:11:24 +00:00
Fix maybe idk
This commit is contained in:
parent
d0143e74c2
commit
4f3f596fbd
2 changed files with 8 additions and 3 deletions
|
@ -17,7 +17,10 @@ creatura_mapgen_spawning (Mapgen Spawning) bool true
|
|||
creatura_mapgen_spawn_interval (Mapgen Spawning Interval) int 5
|
||||
|
||||
# How many Mobs can be a in a Mapblock before ABM spawning is blocked
|
||||
creatura_mapblock_limit (Max Mobs per Mapblock) int 99
|
||||
creatura_mapblock_limit (Max Mobs per Mapblock) int 12
|
||||
|
||||
# How many Mobs can be within Active Block Send Range of an attempted spawn before stopping attempt
|
||||
creatura_abr_limit (Max Mobs within ABR) int 24
|
||||
|
||||
# Minimum distance to a player for ABM Spawning
|
||||
creatura_min_abm_dist (Minimum ABM Spawning Distance) int 32
|
||||
|
|
|
@ -490,7 +490,8 @@ minetest.register_abm({
|
|||
|
||||
local protected_spawn = minetest.settings:get_bool("creatura_protected_spawn", true)
|
||||
local abr = (tonumber(minetest.get_mapgen_setting("active_block_range")) or 4) * 16
|
||||
local max_per_block = tonumber(minetest.settings:get("creatura_mapblock_limit")) or 99
|
||||
local max_per_block = tonumber(minetest.settings:get("creatura_mapblock_limit")) or 12
|
||||
local max_in_abr = tonumber(minetest.settings:get("creatura_abr_limit")) or 24
|
||||
local min_abm_dist = tonumber(minetest.settings:get("creatura_min_abm_dist")) or 32
|
||||
|
||||
local function can_spawn(pos, width, height)
|
||||
|
@ -591,7 +592,8 @@ function creatura.register_abm_spawn(mob, def)
|
|||
if ent
|
||||
and ent.name == mob then
|
||||
mob_count = mob_count + 1
|
||||
if mob_count > spawn_cap then
|
||||
if mob_count > spawn_cap
|
||||
or mob_count > max_in_abr then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue