Speed up ME Terminal search performance by using CompletableFuture
This commit is contained in:
@@ -94,4 +94,9 @@ public class ItemListIgnoreCrafting<T extends IAEStack<T>> implements IItemList<
|
||||
public void resetStatus() {
|
||||
this.target.resetStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemListIgnoreCrafting<T> clone() {
|
||||
return new ItemListIgnoreCrafting<>(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,14 @@ public final class ItemList implements IItemList<IAEItemStack> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemList clone() {
|
||||
ItemList list = new ItemList();
|
||||
list.records.putAll(records);
|
||||
list.version.set(version.get());
|
||||
return list;
|
||||
}
|
||||
|
||||
private ItemVariantList getOrCreateRecord(Item item) {
|
||||
return this.records.computeIfAbsent(item, this::makeRecordMap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user