use of mekanism.common.content.qio.filter.QIOModIDFilter in project Mekanism by mekanism.
the class TileEntityQIOExporter method getFilterEjectMap.
private Object2LongMap<HashedItem> getFilterEjectMap(TileEntity back, QIOFrequency freq) {
Object2LongMap<HashedItem> map = new Object2LongOpenHashMap<>();
for (QIOFilter<?> filter : getFilters()) {
if (filter instanceof QIOItemStackFilter) {
QIOItemStackFilter itemFilter = (QIOItemStackFilter) filter;
if (itemFilter.fuzzyMode) {
map.putAll(freq.getStacksByItem(itemFilter.getItemStack().getItem()));
} else {
HashedItem type = HashedItem.create(itemFilter.getItemStack());
map.put(type, freq.getStored(type));
}
} else if (filter instanceof QIOTagFilter) {
String tagName = ((QIOTagFilter) filter).getTagName();
map.putAll(freq.getStacksByTagWildcard(tagName));
} else if (filter instanceof QIOModIDFilter) {
String modID = ((QIOModIDFilter) filter).getModID();
map.putAll(freq.getStacksByModIDWildcard(modID));
}
}
return map;
}
Aggregations