From 034b0142c647f4434e822a5847c9ae71c054d20f Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 16 Feb 2024 23:44:55 +0000 Subject: [PATCH] Make sure the inventory slot has at least the number of items requsted in it before selecting it --- 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 128fa7e54..477d05b4e 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -266,7 +266,7 @@ function mcl_util.select_stack(src_inventory, src_list, dst_inventory, dst_list, stack = src_inventory:get_stack(src_list, i) -- Allow for partial stack movement - if count then + if count and stack:get_count() >= count then local new_stack = ItemStack(stack) new_stack:set_count(count) stack = new_stack