Skip to content

Commit

Permalink
Update miniAdapter.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Kan18 authored Jul 4, 2023
1 parent 2e81cdf commit 6247784
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion milo/apis/miniAdapter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 }, ':')

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

Expand Down

0 comments on commit 6247784

Please sign in to comment.