blockgame/mods/bg_funnel/node.lua

28 lines
644 B
Lua
Raw Normal View History

2023-10-14 13:33:24 +00:00
local modname = minetest.get_current_modname()
local api = load_file("api")
blockgame.register_node(modname .. ":funnel", {
description = "Funnel",
tiles = {
modname .. "_funnel_top.png",
modname .. "_funnel_top.png",
modname .. "_funnel.png",
},
groups = {
woody = 1,
},
on_place = function (...)
return api.place_funnel(...)
end,
on_dig = function (...)
return api.dig_funnel(...)
end,
preserve_metadata = function (pos, node, meta, drops)
-- TODO: store funnel contents inside dropped item.
end,
after_place_node = function (pos, placer, item_stack)
-- TODO: recreate funnel contents from placed item.
end,
})