since we split to mapblocks now,

biome.max_count as received from mods has to be scaled appropriately
as mods expect this value to be relative to the usual
chunk size of 80x80 = 6400 nodes' horizontal area.
This commit is contained in:
Vanessa Dannenberg 2021-04-01 08:16:57 -04:00
parent ec0a0f0c3b
commit 26dbbb5a67
1 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ function biome_lib:set_defaults(biome)
biome.near_nodes_size = biome.near_nodes_size or 0
biome.near_nodes_count = biome.near_nodes_count or 1
biome.rarity = biome.rarity or 50
biome.max_count = biome.max_count or 5
biome.max_count = biome.max_count or 125
if biome.check_air ~= false then biome.check_air = true end
-- specific to abm spawner
@ -353,7 +353,7 @@ function biome_lib:populate_surfaces(biome, nodes_or_function_or_model, snodes,
return 0
end
for i = 1, math.min(biome.max_count, num_in_biome_nodes) do
for i = 1, math.min(biome.max_count/25, num_in_biome_nodes) do
local tries = 0
local spawned = false
while tries < 2 and not spawned do