From 62477844fce94e96aca8703c818b3c66ffdbc99b Mon Sep 17 00:00:00 2001 From: Kan18 <24967425+Kan18@users.noreply.github.com> Date: Tue, 4 Jul 2023 13:27:53 -0400 Subject: [PATCH] Update miniAdapter.lua --- milo/apis/miniAdapter.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/milo/apis/miniAdapter.lua b/milo/apis/miniAdapter.lua index cb348b4..430ea1a 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