diff --git a/milo/apis/miniAdapter.lua b/milo/apis/miniAdapter.lua index cb348b45..430ea1ae 100644 --- a/milo/apis/miniAdapter.lua +++ b/milo/apis/miniAdapter.lua @@ -19,7 +19,9 @@ function Adapter:listItems(throttle) local cache = { } throttle = throttle or Util.throttle() - for k,v in pairs(self.list()) do + local list = self.list() + + for k,v in pairs(list) do if v.count > 0 then local key = table.concat({ v.name, v.nbt }, ':') @@ -37,6 +39,10 @@ function Adapter:listItems(throttle) -- useful for when inserting into chests -- ie. insert only if chest does not have item and has free slots + -- bodge to make statsView not delay + -- todo: handle this better properly + self.__used = Util.size(list) + self.cache = cache end