From 5a75d9d47c41cacc7dc7c695ce7f7cd840f51991 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 18 Jun 2019 23:04:37 +0800 Subject: click on arrows --- .../java/me/shedaniel/rei/client/ClientHelperImpl.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java') diff --git a/src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java b/src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java index 0b4c4f821..268cbf578 100644 --- a/src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java @@ -218,6 +218,21 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer { return map.keySet().size() > 0; } + @Override + public boolean executeViewAllRecipesFromCategories(List categories) { + Map> map = Maps.newLinkedHashMap(); + for(Identifier category : categories) { + Optional any = RecipeHelper.getInstance().getAllCategories().stream().filter(c -> c.getIdentifier().equals(category)).findAny(); + if (!any.isPresent()) + continue; + RecipeCategory recipeCategory = any.get(); + map.put(recipeCategory, RecipeHelper.getInstance().getAllRecipesFromCategory(recipeCategory)); + } + if (map.keySet().size() > 0) + openRecipeViewingScreen(map); + return map.keySet().size() > 0; + } + @Override public void openRecipeViewingScreen(Map> map) { if (RoughlyEnoughItemsCore.getConfigManager().getConfig().screenType == RecipeScreenType.VILLAGER) -- cgit