From bf3efa0bb71ae5131e4aec053c9f614b52f8a36e Mon Sep 17 00:00:00 2001
From: Paramat <paramat@users.noreply.github.com>
Date: Tue, 17 Jul 2018 05:04:46 +0100
Subject: [PATCH] Flora spread: Reduce maximum density

Previously, maximum flora density was chosen based on the extremely rare
occurrence of all 8 flowers being at high density at one location. This
caused flora everywhere to spread to an unacceptably high density.

Revert the threshold to 3, which in testing results in a more acceptable
maximum density of 7 flora per 9x9 area.
---
 mods/flowers/init.lua | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua
index 2afb5a0..3ad4bf6 100644
--- a/mods/flowers/init.lua
+++ b/mods/flowers/init.lua
@@ -139,12 +139,9 @@ function flowers.flower_spread(pos, node)
 
 	local pos0 = vector.subtract(pos, 4)
 	local pos1 = vector.add(pos, 4)
-	-- Maximum flower density created by mapgen is 13 per 9x9 area.
-	-- The limit of 7 below was tuned by in-game testing to result in a maximum
-	-- flower density by ABM spread of 13 per 9x9 area.
-	-- Warning: Setting this limit theoretically without in-game testing
-	-- results in a maximum flower density by ABM spread that is far too high.
-	if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 7 then
+	-- Testing shows that a threshold of 3 results in an appropriate maximum
+	-- density of approximately 7 flora per 9x9 area.
+	if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
 		return
 	end