diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java b/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java index 1f03ac8aa..80db040d1 100644 --- a/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java @@ -1,3 +1,8 @@ +/* + * Roughly Enough Items by Danielshe. + * Licensed under the MIT License. + */ + package me.shedaniel.rei.client; import com.google.common.collect.Lists; @@ -30,7 +35,6 @@ public class RecipeHelperImpl implements RecipeHelper { VISIBILITY_HANDLER_COMPARATOR = comparator.reversed(); } - private final List<Recipe> sortedRecipes = new ArrayList<>(); private final AtomicInteger recipeCount = new AtomicInteger(); private final Map<Identifier, List<RecipeDisplay>> recipeCategoryListMap = Maps.newHashMap(); private final Map<Identifier, DisplaySettings> categoryDisplaySettingsMap = Maps.newHashMap(); @@ -194,7 +198,6 @@ public class RecipeHelperImpl implements RecipeHelper { this.speedCraftFunctionalMap.clear(); this.categoryDisplaySettingsMap.clear(); this.displayVisibilityHandlers.clear(); - this.sortedRecipes.clear(); ((DisplayHelperImpl) RoughlyEnoughItemsCore.getDisplayHelper()).resetCache(); BaseBoundsHandler baseBoundsHandler = new BaseBoundsHandlerImpl(); RoughlyEnoughItemsCore.getDisplayHelper().registerBoundsHandler(baseBoundsHandler); @@ -248,9 +251,7 @@ public class RecipeHelperImpl implements RecipeHelper { @Override public List<Recipe> getVanillaSortedRecipes() { - if (sortedRecipes.isEmpty()) - sortedRecipes.addAll(getRecipeManager().values().stream().sorted(RECIPE_COMPARATOR).collect(Collectors.toSet())); - return sortedRecipes; + return getRecipeManager().values().stream().sorted(RECIPE_COMPARATOR).collect(Collectors.toList()); } @Override |
