furnace: missing 'sanity' check

User avatar
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

furnace: missing 'sanity' check

by rnd » Wed Dec 20, 2017 14:50

1. suppose you have item with long burn time that requires a lot of fuel.

2. put item in chest, add any fuel (1 piece of wood will do) and quickly go away so that area unloads.
wait however long is needed for smelting

3. come back.. your item is magically smelted, even though the fuel was clearly not sufficient (need to add missing FUEL CHECK here)

Code: Select all
minetest.register_node("default:furnace", {
on_timer = furnace_node_timer,

local function furnace_node_timer(pos, elapsed)

if fuel_time < fuel_totaltime then
   -- The furnace is currently active and has enough fuel
   fuel_time = fuel_time + elapsed
        if cookable then
       src_time = src_time + elapsed
      if src_time >= cooked.time then
               -- Place result in dst list if possible

FIX: check if fuel.time is enough to smelt item or abort smelt process.

User avatar
Posts: 3817
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: furnace: missing 'sanity' check

by sfan5 » Wed Dec 20, 2017 15:42

You should open an issue here.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Posts: 1061
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

Re: furnace: missing 'sanity' check

by sorcerykid » Wed Dec 20, 2017 16:23

Thanks for the heads up rnd. I will go ahead and put a fix into place on my server. Hopefully other server operators will see this report and do the same.

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

Re: furnace: missing 'sanity' check

by sofar » Thu Dec 21, 2017 05:34

Please take the time and share your fix, so it can be fixed in the various forks of minetest_game?

User avatar
Posts: 3643
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: furnace: missing 'sanity' check

by Wuzzy » Wed Dec 27, 2017 19:27

Sorcerykid is usually not interested in sharing anything. We're on our own.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Return to Problems

Who is online

Users browsing this forum: No registered users and 2 guests