Skip to content

Commit

Permalink
Replace EnumSet with HashSet
Browse files Browse the repository at this point in the history
EnumSet breaks due to dynamic modification of the OrePrefixes enum
  • Loading branch information
D-Cysteine committed Jan 30, 2023
1 parent 6f9f9d3 commit cbc651a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.dcysteine.neicustomdiagram.generators.gregtech5.recipedebugger;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -437,7 +437,6 @@ private static boolean smallVariantRecipe(Recipe recipe) {

private static Set<OrePrefixes> getOrePrefixes(Set<Component> componentSet) {
return componentSet.stream().map(GregTechOreDictUtil::getItemData).filter(Optional::isPresent)
.map(itemData -> itemData.get().mPrefix)
.collect(Collectors.toCollection(() -> EnumSet.noneOf(OrePrefixes.class)));
.map(itemData -> itemData.get().mPrefix).collect(Collectors.toCollection(HashSet::new));
}
}

0 comments on commit cbc651a

Please sign in to comment.