Fix hopper breakage in get_item_group return value.
In commit 55009c257e
that added vectors to
mcl_composters, mcl_hoppers was accidentally patched with a unrelated
change, updating it to get_item_group(). This mostly works, but in one
particular case the semantics of the return value differs. Instead of
returning 'nil' it returns '0'. That altered the evaluation of an if
condition, breaking the abm that sucks in items.
This commit fixes the conditional by explicitly comparing '~= 0'.
new_mapgen_api
parent
c60fd92638
commit
5431e206b0
|
@ -343,7 +343,7 @@ minetest.register_abm({
|
|||
local abovenode = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
if not minetest.registered_items[abovenode.name] then return end
|
||||
-- Don't bother checking item enties if node above is a container (should save some CPU)
|
||||
if minetest.get_item_group(abovenode.name, "container") then
|
||||
if minetest.get_item_group(abovenode.name, "container") ~= 0 then
|
||||
return
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
|
Loading…
Reference in New Issue