FurnaceManager is object that operates on factory level. It’s created in BravoFactory‘s constructor and available as factory.furnace_manager.
The FurnaceManager has only one usable method: update(coords) where coords is tuple (bigx, smallx, bigz, smallz, y) - coordinates of the furnace which inventory was updated.
from bravo.parameters import factory
window = player.windows[-1]
if type(window) != FurnaceWindow:
return
factory.furnace_manager.update(window.coords)
When the update() method is called the FurnaceManager creates FurnaceProcess for the furnace with given coordinates if not created yet and calls FurnaceProcess‘s update() method. Every 5 minutes it checks for furnaces that do not burn and remove the corresponding processes to preserve some memory.
FurnaceProcess.update() method checks if current furnace shall start to burn: it must have source item, fuel and must have valid recipe. If it meets the requirements Furnace Process schedules burn() method with LoopingCall for every .5 second.
At every burn() call it: