From a9c197b1e5d7265e88219aacef53965a22257fda Mon Sep 17 00:00:00 2001 From: sfence Date: Tue, 15 Apr 2025 21:42:12 +0200 Subject: [PATCH] Expand usable range of fill_ratio to about 2.3e-10 (#16026) --- src/mapgen/mg_decoration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapgen/mg_decoration.cpp b/src/mapgen/mg_decoration.cpp index 8810a654d..298184a10 100644 --- a/src/mapgen/mg_decoration.cpp +++ b/src/mapgen/mg_decoration.cpp @@ -163,7 +163,7 @@ void Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) deco_count = deco_count_f; } else if (deco_count_f > 0.0f) { // For very low density calculate a chance for 1 decoration - if (ps.range(1000) <= deco_count_f * 1000.0f) + if (ps.next() <= deco_count_f * PcgRandom::RANDOM_RANGE) deco_count = 1; } }