How to change burning time of a fuel?

Post Reply
Arigoth
New member
Posts: 2
Joined: Tue Mar 13, 2018 01:03

How to change burning time of a fuel?

by Arigoth » Post

Brand new to Minetest modding.
I would like to change the burning time of coal from 40 sec. to 20 sec.

In searching, the only thing I can find is item overriding.

I've tried...

Code: Select all

minetest.override_item("default:coal_lump", {burntime=20})
But this does not change the burning time.

What is the proper way to do this?
Any help will be greatly appreciated.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: How to change burning time of a fuel?

by sofar » Post

You have to re-define the 'fuel' type craft.

The original for coal is like:

Code: Select all

minetest.register_craft({
	type = "fuel",
	recipe = "default:coal_lump",
	burntime = 40,
})
To change it, make a new mod that depends on `default` and re-define the same recipe in it with a new burntime.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: How to change burning time of a fuel?

by Linuxdirk » Post

sofar wrote:To change it, make a new mod that depends on `default` and re-define the same recipe in it with a new burntime.
Why can't we use minetest.override_item() for that? That what's it made for.

Arigoth
New member
Posts: 2
Joined: Tue Mar 13, 2018 01:03

Re: How to change burning time of a fuel?

by Arigoth » Post

Works perfectly, thank you very much.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: How to change burning time of a fuel?

by ChimneySwift » Post

Linuxdirk wrote:Why can't we use minetest.override_item() for that? That what's it made for.
Unless I'm mistaken, minetest.override_item() overrides item registration. Crafts and item registration are separate so minetest.override_item() would do nothing.
A spoon is basically a tiny bowl with a stick on it

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests