2023-10-14 13:33:24 +00:00
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
|
|
|
blockgame.crafting.register_pummel_recipe({
|
|
|
|
label = "pummel logs into funnel",
|
|
|
|
used_item = "woodworking:plank",
|
2023-10-15 16:22:13 +00:00
|
|
|
target_node = "bg_tree:log",
|
2023-10-14 13:33:24 +00:00
|
|
|
check = function (pos, used_node, target_node)
|
|
|
|
local below = pos + blockgame.vector.dirs.down
|
2023-10-15 16:22:13 +00:00
|
|
|
return minetest.get_node(below).name == "bg_tree:log"
|
2023-10-14 13:33:24 +00:00
|
|
|
end,
|
|
|
|
on_success = function (pos, used_node, target_node)
|
|
|
|
local below = pos + blockgame.vector.dirs.down
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
minetest.set_node(below, {name = modname .. ":funnel"})
|
|
|
|
end,
|
|
|
|
})
|