VoxeLibre/mods/ITEMS/vl_hollow_logs/recipes.lua

49 lines
1.1 KiB
Lua
Raw Permalink Normal View History

function vl_hollow_logs.register_craft(material, result)
2024-04-30 03:55:17 +02:00
minetest.register_craft({
output = "vl_hollow_logs:"..result.."_hollow 4",
recipe = {
{"", material, ""},
{material, "", material},
{"", material, ""}
},
type = "shaped"
})
2024-04-30 03:55:17 +02:00
mcl_stonecutter.register_recipe(material, "vl_hollow_logs:"..result.."_hollow", 1)
end
for _, defs in pairs(vl_hollow_logs.logs) do
2024-04-30 03:55:17 +02:00
local mod, material, stripped_material
local name = defs[1]
local stripped_name = defs[2]
2024-04-30 03:55:17 +02:00
if name:find("cherry") then
mod = "mcl_cherry_blossom:"
elseif name:find("mangrove") then
mod = "mcl_mangrove:"
elseif name:find("hyphae") then
mod = "mcl_crimson:"
else
mod = "mcl_core:"
end
2024-04-30 03:55:17 +02:00
material = mod..name
stripped_material = mod..stripped_name
2024-04-30 03:55:17 +02:00
vl_hollow_logs.register_craft(material, name)
vl_hollow_logs.register_craft(stripped_material, stripped_name)
end
minetest.register_craft({
2024-04-30 03:55:17 +02:00
burntime = 10,
recipe = "group:hollow_log_burnable",
type = "fuel",
})
minetest.register_craft({
2024-04-30 03:55:17 +02:00
cooktime = 5,
output = "mcl_core:charcoal_lump",
recipe = "group:hollow_log_burnable",
type = "cooking"
})