2023-10-11 07:17:21 +00:00
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
2023-10-11 10:04:16 +00:00
|
|
|
-- plant saplings
|
|
|
|
-- TODO: when recipes add support for groups, use `dirty` group here instead of specific nodes.
|
2023-10-11 07:17:21 +00:00
|
|
|
blockgame.crafting.register_stack_recipe("core:grass", modname .. ":nut", {name = modname .. ":sapling"})
|
2023-10-11 10:04:16 +00:00
|
|
|
blockgame.crafting.register_stack_recipe("core:dirt", modname .. ":nut", {name = modname .. ":sapling"})
|
|
|
|
|
|
|
|
blockgame.crafting.register_pummel_recipe({
|
|
|
|
label = "pummel leaves into dirt",
|
|
|
|
used_item = modname .. ":leaves",
|
|
|
|
target_node = modname .. ":leaves",
|
|
|
|
on_success = function (pos, used_node, target_node)
|
|
|
|
minetest.set_node(pos, {name = "core:dirt"})
|
|
|
|
end,
|
|
|
|
})
|