fixes item showing incorrect amounts

This commit is contained in:
PrototypeTrousers
2021-08-13 00:16:16 -03:00
parent 9a71bfb0f0
commit 618e9390c6
3 changed files with 1 additions and 32 deletions
-29
View File
@@ -61,7 +61,6 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
private final Object2ObjectMap<IMEMonitorHandlerReceiver<T>, Object> listeners;
private boolean sendEvent = false;
private boolean forceUpdate = false;
@Nonnegative
private int localDepthSemaphore = 0;
private long gridItemCount;
@@ -153,13 +152,6 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
@Override
public IItemList<T> getStorageList()
{
if( forceUpdate )
{
forceUpdate = false;
this.cachedList.resetStatus();
return this.getAvailableItems( this.cachedList );
}
return this.cachedList;
}
@@ -288,27 +280,6 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
}
}
void forceUpdate()
{
this.forceUpdate = true;
final Iterator<Entry<IMEMonitorHandlerReceiver<T>, Object>> i = this.getListeners();
while ( i.hasNext() )
{
final Entry<IMEMonitorHandlerReceiver<T>, Object> o = i.next();
final IMEMonitorHandlerReceiver<T> receiver = o.getKey();
if( receiver.isValid( o.getValue() ) )
{
receiver.onListUpdate();
}
else
{
i.remove();
}
}
}
void onTick()
{
if( this.sendEvent )