diff --git a/IO.lua b/IO.lua index ae16889..a36da12 100644 --- a/IO.lua +++ b/IO.lua @@ -35,9 +35,9 @@ while true do for slot, item in pairs(stacks_stored) do local ii = w.get_internal_identifier(item) - local stored = stacks_stored[ii] or 0 + local stored = items_stored[ii] or 0 local wanted = conf.items[ii] or 0 - if (get_num_stacks(stored) * 64) > wanted then -- if item is not in want list or we have too many, send it back to storage + if (get_num_stacks(stored) * 64) >= wanted then -- if item is not in want list or we have too many, send it back to storage local result = w.unwrap(w.query_by_type("storage", { type = "insert", from_inventory = conf.chest,