mirror of
https://github.com/mt-mods/biome_lib.git
synced 2024-12-26 02:40:17 +01:00
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:
parent
ec0a0f0c3b
commit
26dbbb5a67
4
init.lua
4
init.lua
@ -158,7 +158,7 @@ function biome_lib:set_defaults(biome)
|
|||||||
biome.near_nodes_size = biome.near_nodes_size or 0
|
biome.near_nodes_size = biome.near_nodes_size or 0
|
||||||
biome.near_nodes_count = biome.near_nodes_count or 1
|
biome.near_nodes_count = biome.near_nodes_count or 1
|
||||||
biome.rarity = biome.rarity or 50
|
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
|
if biome.check_air ~= false then biome.check_air = true end
|
||||||
|
|
||||||
-- specific to abm spawner
|
-- specific to abm spawner
|
||||||
@ -353,7 +353,7 @@ function biome_lib:populate_surfaces(biome, nodes_or_function_or_model, snodes,
|
|||||||
return 0
|
return 0
|
||||||
end
|
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 tries = 0
|
||||||
local spawned = false
|
local spawned = false
|
||||||
while tries < 2 and not spawned do
|
while tries < 2 and not spawned do
|
||||||
|
Loading…
Reference in New Issue
Block a user