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
+1 -1
View File
@@ -3,7 +3,7 @@ aechannel=stable
aebuild=7 aebuild=7
aegroup=appeng aegroup=appeng
aebasename=appliedenergistics2 aebasename=appliedenergistics2
trousers=omni-fixes-v46d trousers=omni-fixes-v46e
######################################################### #########################################################
# Versions # # Versions #
-2
View File
@@ -248,8 +248,6 @@ public class GridStorageCache implements IStorageGrid
} }
} }
this.storageMonitors.forEach( ( channel, monitor ) -> monitor.forceUpdate() );
tracker.applyChanges(); tracker.applyChanges();
} }
-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 final Object2ObjectMap<IMEMonitorHandlerReceiver<T>, Object> listeners;
private boolean sendEvent = false; private boolean sendEvent = false;
private boolean forceUpdate = false;
@Nonnegative @Nonnegative
private int localDepthSemaphore = 0; private int localDepthSemaphore = 0;
private long gridItemCount; private long gridItemCount;
@@ -153,13 +152,6 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
@Override @Override
public IItemList<T> getStorageList() public IItemList<T> getStorageList()
{ {
if( forceUpdate )
{
forceUpdate = false;
this.cachedList.resetStatus();
return this.getAvailableItems( this.cachedList );
}
return 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() void onTick()
{ {
if( this.sendEvent ) if( this.sendEvent )