From 26dbbb5a67fc2ec4aad709a7353d1af892a95643 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 1 Apr 2021 08:16:57 -0400 Subject: [PATCH] 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. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index d05ddfb..76e5064 100644 --- a/init.lua +++ b/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_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