From 5b56acd415cd14d2e26b80edb5f7f51b0c973c7f Mon Sep 17 00:00:00 2001 From: balazsszalab Date: Sat, 18 Jun 2022 16:40:50 +0000 Subject: [PATCH] Fix skipping growth stages of mcl_farming plants Because usually math.ceil(intervals_counter)>=1, stages + math.ceil(intervals_counter)>=2. It causes the plants to skip growth stages and they usually grow two stages at once. Changing ceil to floor seems to solve the problem. --- mods/ITEMS/mcl_farming/shared_functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_farming/shared_functions.lua b/mods/ITEMS/mcl_farming/shared_functions.lua index e942415f5..8c712f8f2 100644 --- a/mods/ITEMS/mcl_farming/shared_functions.lua +++ b/mods/ITEMS/mcl_farming/shared_functions.lua @@ -129,7 +129,7 @@ function mcl_farming:grow_plant(identifier, pos, node, stages, ignore_light, low if not stages then stages = 1 end - stages = stages + math.ceil(intervals_counter) + stages = stages + math.floor(intervals_counter) local new_node = {name = plant_info.names[step+stages]} if new_node.name == nil then new_node.name = plant_info.full_grown