minetest-mods / moreblocks

More Blocks
https://content.minetest.net/packages/Calinou/moreblocks/
zlib License
45 stars 67 forks source link

Make variants of nodes that can burn also burnable #177

Open Caellian opened 3 years ago

Caellian commented 3 years ago

Stairs mod handles it with the following:

local baseburntime = minetest.get_craft_result({
    method = "fuel",
    width = 1,
    items = {basenode}
}).time
if baseburntime > 0 then
    -- TODO: Properly handle burn times
    minetest.register_craft({
        type = "fuel",
        recipe = "stairs:slab_" .. subname,
        burntime = math.floor(baseburntime * 0.5),
    })
end

this should be pretty straightforward to handle in recipes.lua.

Moreblocks handles information about ratios much better than stairs so it'll be easier to handle all cases properly.