Guava migration - ItemPool collector

This commit is contained in:
Jetz
2024-09-16 09:10:21 -04:00
parent ae251372c1
commit 7ab333a60a
2 changed files with 37 additions and 10 deletions

View File

@@ -141,10 +141,10 @@ public final class CEditorVariant extends CDeckEditor<Deck> {
*/
@Override
public void resetTables() {
Iterable<PaperCard> allNT = FModel.getMagicDb().getVariantCards().getAllCards();
allNT = Iterables.filter(allNT, cardPoolCondition);
ItemPool<PaperCard> allNT = FModel.getMagicDb().getVariantCards().streamAllCards()
.filter(cardPoolCondition).collect(ItemPool.collector(PaperCard.class));
this.getCatalogManager().setPool(ItemPool.createFrom(allNT, PaperCard.class), true);
this.getCatalogManager().setPool(allNT, true);
this.getDeckManager().setPool(this.controller.getModel().getOrCreate(this.sectionMode));
}