27 lines
644 B
Lua
27 lines
644 B
Lua
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,
|
|
})
|