Skip to content

Commit

Permalink
Remove duplicate categories in recipe list
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Nov 27, 2015
1 parent 07b3ec4 commit b02dc78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/mezz/jei/util/RecipeMap.java
Expand Up @@ -9,8 +9,10 @@

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import net.minecraft.item.ItemStack;

Expand All @@ -37,7 +39,7 @@ public RecipeMap(final RecipeCategoryComparator recipeCategoryComparator) {

@Nonnull
public ImmutableList<IRecipeCategory> getRecipeCategories(@Nonnull ItemStack itemStack) {
List<IRecipeCategory> recipeCategories = new ArrayList<>();
Set<IRecipeCategory> recipeCategories = new HashSet<>();
for (String stackKey : getNamesWithWildcard(itemStack)) {
recipeCategories.addAll(categoryMap.get(stackKey));
}
Expand Down

0 comments on commit b02dc78

Please sign in to comment.