mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-12 21:10:24 +02:00
Replace deprecated 'furnace_burntime' with fuel registration
This is the same implementation that Luanti uses to to ensure compatibility.
This commit is contained in:
13
nodes.lua
13
nodes.lua
@ -496,9 +496,22 @@ local nodes = {
|
||||
for name, def in pairs(nodes) do
|
||||
def.is_ground_content = def.is_ground_content == true
|
||||
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
|
||||
|
||||
local burntime = def.furnace_burntime
|
||||
def.furnace_burntime = nil -- deprecated node def field
|
||||
|
||||
minetest.register_node("moreblocks:" ..name, def)
|
||||
minetest.register_alias(name, "moreblocks:" ..name)
|
||||
|
||||
-- Optional: register the node as fuel
|
||||
if burntime then
|
||||
core.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "moreblocks:" .. name,
|
||||
burntime = burntime,
|
||||
})
|
||||
end
|
||||
|
||||
local tiles = def.tiles
|
||||
|
||||
-- Use the primary tile for all sides of cut glasslike nodes.
|
||||
|
Reference in New Issue
Block a user