From e5822ecc35cfa346ab9ea8b9b9d751811faa20d5 Mon Sep 17 00:00:00 2001 From: kno10 Date: Sun, 5 Jan 2025 02:25:48 +0100 Subject: [PATCH] fix undefined globals in mcl_bamboo (#4797) Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4797 Reviewed-by: teknomunk Co-authored-by: kno10 Co-committed-by: kno10 --- mods/ITEMS/mcl_bamboo/globals.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index eea779b90..3cafb3836 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -111,8 +111,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) end -- Determine the location of soil - local soil_pos - soil_pos,a,b = mcl_util.trace_nodes(pos, -1, mcl_bamboo.bamboo_set, BAMBOO_MAX_HEIGHT - 1) + local soil_pos = mcl_util.trace_nodes(pos, -1, mcl_bamboo.bamboo_set, BAMBOO_MAX_HEIGHT - 1) -- No soil found, return false so that bonemeal isn't used if not soil_pos then return false end @@ -147,7 +146,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local grow_amount = 1 if bonemeal_applied then local rng = PcgRandom(minetest.hash_node_position(pos) + minetest.get_us_time()) - if rng:next(1, GROW_DOUBLE_CHANGE) == 1 then + if rng:next(1, GROW_DOUBLE_CHANCE) == 1 then grow_amount = 2 end end