From 6e0adcedef9b00b7186ca09bbf0249ffefe82a78 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 7 Feb 2022 09:33:00 +0100 Subject: [PATCH] simplify random dropping position code --- mods/CORE/mcl_util/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 12645bbfa..03f6106f2 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -368,7 +368,7 @@ function mcl_util.drop_items_from_meta_container(listname) for i = 1, inv:get_size(listname) do local stack = inv:get_stack(listname, i) if not stack:is_empty() then - local p = vector.add(pos, vector.new(math.random(0, 10)/10 - 0.5, 0, math.random(0, 10)/10 - 0.5)) + local p = vector.add(pos, vector.new(math.random() - 0.5, 0, math.random(0, 10)/10 - 0.5)) minetest.add_item(p, stack) end end