mirror of
https://github.com/minetest-mods/hopper.git
synced 2024-12-23 05:42:30 +01:00
Fix hopper stall bug
This commit is contained in:
parent
73e258b005
commit
316edc5374
11
init.lua
11
init.lua
@ -227,13 +227,9 @@ local transfer = function(src, srcpos, dst, dstpos, name)
|
|||||||
stack = inv:get_stack(src, i)
|
stack = inv:get_stack(src, i)
|
||||||
item = stack:get_name()
|
item = stack:get_name()
|
||||||
|
|
||||||
-- if slot not empty
|
-- if slot not empty and room for item in destination
|
||||||
if item ~= "" then
|
if item ~= ""
|
||||||
|
and inv2:room_for_item(dst, item) then
|
||||||
-- room in destination?
|
|
||||||
if inv2:room_for_item(dst, item) == false then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- is item a tool
|
-- is item a tool
|
||||||
if stack:get_wear() > 0 then
|
if stack:get_wear() > 0 then
|
||||||
@ -246,7 +242,6 @@ local transfer = function(src, srcpos, dst, dstpos, name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user