Make sideways hoppers try pushing down before sideways

This is consistent with its behaviour in Minecraft.
This commit is contained in:
wallabra 2022-02-17 17:39:45 -03:00
parent 7be9a8a574
commit eee07f56b5
Signed by untrusted user: Gustavo6046
GPG Key ID: 5182FABAA5E139B3
1 changed files with 5 additions and 0 deletions

View File

@ -453,6 +453,11 @@ minetest.register_abm({
end
end
-- Try to move an item below before moving it sideways
local downnode = minetest.get_node(downpos)
if not minetest.registered_nodes[downnode.name] then return end
if mcl_util.move_item_container(pos, downpos) then return end
-- Move an item from the hopper into the container to which the hopper points to
local g = minetest.registered_nodes[frontnode.name].groups.container
if g == 2 or g == 3 or g == 5 or g == 6 then