mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-26 15:03:17 +00:00
Feature: Pattern Repeater (#1000)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
1 parent
a0604b8ad1
commit
464b9e6f47
16 files changed
+591
-8
No files matched your search
+4
-3
@@ -11,13 +11,14 @@
|
||||
package appeng.me.cache;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
@@ -68,7 +69,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T> {
|
||||
@Nonnegative
|
||||
private int localDepthSemaphore = 0;
|
||||
|
||||
private final Set<IStorageInterceptor> storageInterceptors = new HashSet<>();
|
||||
private final Set<IStorageInterceptor> storageInterceptors = Collections.newSetFromMap(new WeakHashMap<>());
|
||||
|
||||
public NetworkMonitor(final GridStorageCache cache, final StorageChannel chan) {
|
||||
this.myGridCache = cache;
|
||||
@@ -160,7 +161,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T> {
|
||||
if (isi.canAccept(input)) {
|
||||
input = (T) isi.injectItems(input, mode, src);
|
||||
|
||||
if (isi.shouldRemoveInterceptor(input)) iterator.remove();
|
||||
if (mode == Actionable.MODULATE && isi.shouldRemoveInterceptor(input)) iterator.remove();
|
||||
|
||||
if (input == null) return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user