mirror of
https://github.com/minetest-mods/hopper.git
synced 2024-11-19 22:03:47 +01:00
add an active object count check to the suction ABM
This commit is contained in:
parent
d6327921ad
commit
ce30c31a24
8
init.lua
8
init.lua
@ -323,7 +323,11 @@ minetest.register_abm({
|
||||
nodenames = {"hopper:hopper", "hopper:hopper_side"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if active_object_count_wider == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local posob
|
||||
|
||||
@ -463,7 +467,7 @@ local directions = {
|
||||
|
||||
-- hopper workings
|
||||
minetest.register_abm({
|
||||
label = "Hopper suction and transfer",
|
||||
label = "Hopper transfer",
|
||||
nodenames = {"hopper:hopper", "hopper:hopper_side"},
|
||||
neighbors = neighbors,
|
||||
interval = 1.0,
|
||||
|
Loading…
Reference in New Issue
Block a user