Allow pusher to pull honey from xdecor:hive and mobs:beehive

This commit is contained in:
Joachim Stolberg 2021-02-22 20:42:16 +01:00
parent e82c621f5c
commit 48f22090e8

View File

@ -103,3 +103,15 @@ techage.register_node({"mobs:beehive"}, {
end,
})
techage.register_node({"xdecor:hive"}, {
on_pull_item = function(pos, in_dir, num)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return techage.get_items(pos, inv, "honey", num)
end,
on_unpull_item = function(pos, in_dir, stack)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return techage.put_items(inv, "honey", stack)
end,
})