mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Make sure the inventory slot has at least the number of items requsted in it before selecting it
This commit is contained in:
parent
e02d1c0e27
commit
034b0142c6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue