Update scan interval and remove redundant cache refresh logic in main loop

This commit is contained in:
MayaTheShy
2026-03-15 23:01:18 -04:00
parent 8e50a79d71
commit 66602474b0

View File

@@ -5,7 +5,7 @@ local DROPPER_NAME = "minecraft:dropper_9"
local BARREL_NAME = "minecraft:barrel_0"
local POLL_INTERVAL = 2 -- seconds between barrel checks
local MONITOR_SIDE = "left"
local SCAN_INTERVAL = 3 -- seconds between background scans
local SCAN_INTERVAL = 120 -- seconds between full background scans
local SMELT_INTERVAL = 3 -- seconds between furnace checks
local SMELT_RESERVE = 64 -- keep at least 1 stack of each raw material
local CACHE_FILE = ".inventory_cache" -- persistent cache file
@@ -1810,12 +1810,6 @@ local function main()
pcall(refreshFurnaceStatus)
needsRedraw = true
smelterNeedsRedraw = true
-- If work was done, scan sooner to update cache
if ok and didWork then
pcall(refreshCache)
needsRedraw = true
smelterNeedsRedraw = true
end
sleep(SMELT_INTERVAL)
end
end,