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.
This commit is contained in:
balazsszalab 2022-06-18 16:40:50 +00:00
parent e2e4f7d2df
commit 5b56acd415
1 changed files with 1 additions and 1 deletions

View File

@ -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