Update miniAdapter.lua

This commit is contained in:
Kan18
2023-07-04 13:27:53 -04:00
committed by GitHub
parent 2e81cdf1f5
commit 62477844fc

View File

@@ -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