aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-06-18 23:04:37 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-06-18 23:04:37 +0800
commit5a75d9d47c41cacc7dc7c695ce7f7cd840f51991 (patch)
tree8bcf1af4dc3846c1669e0f7767fa8e9ddc1a1f6c /src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java
parente3c936978b5b79cef6b937ab0cedf208d80da714 (diff)
downloadRoughlyEnoughItems-5a75d9d47c41cacc7dc7c695ce7f7cd840f51991.tar.gz
RoughlyEnoughItems-5a75d9d47c41cacc7dc7c695ce7f7cd840f51991.tar.bz2
RoughlyEnoughItems-5a75d9d47c41cacc7dc7c695ce7f7cd840f51991.zip
click on arrows
Diffstat (limited to 'src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/client/ClientHelperImpl.java15
1 files changed, 15 insertions, 0 deletions
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
@@ -219,6 +219,21 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
}
@Override
+ public boolean executeViewAllRecipesFromCategories(List<Identifier> categories) {
+ Map<RecipeCategory, List<RecipeDisplay>> map = Maps.newLinkedHashMap();
+ for(Identifier category : categories) {
+ Optional<RecipeCategory> 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<RecipeCategory, List<RecipeDisplay>> map) {
if (RoughlyEnoughItemsCore.getConfigManager().getConfig().screenType == RecipeScreenType.VILLAGER)
MinecraftClient.getInstance().openScreen(new VillagerRecipeViewingScreen(map));