From 9ef5d545f83b46cbae094eb2c92289792d4a32df Mon Sep 17 00:00:00 2001 From: bconlon <67203206+bconlon1@users.noreply.github.com> Date: Fri, 14 Oct 2022 09:44:30 -0700 Subject: [PATCH] [1.18.x] Backport recipe grouping feature to 1.18. (#8984) --- .../net/minecraft/client/ClientRecipeBook.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/minecraft/net/minecraft/client/ClientRecipeBook.java.patch b/patches/minecraft/net/minecraft/client/ClientRecipeBook.java.patch index cf29f1ae9c..f3265485d3 100644 --- a/patches/minecraft/net/minecraft/client/ClientRecipeBook.java.patch +++ b/patches/minecraft/net/minecraft/client/ClientRecipeBook.java.patch @@ -1,5 +1,14 @@ --- a/net/minecraft/client/ClientRecipeBook.java +++ b/net/minecraft/client/ClientRecipeBook.java +@@ -52,7 +_,7 @@ + for(Recipe recipe : p_90643_) { + if (!recipe.m_5598_() && !recipe.m_142505_()) { + RecipeBookCategories recipebookcategories = m_90646_(recipe); +- String s = recipe.m_6076_(); ++ String s = recipe.m_6076_().isEmpty() ? recipe.m_6423_().toString() : recipe.m_6076_(); // FORGE: Group value defaults to the recipe's ID if the recipe's explicit group is empty. + if (s.isEmpty()) { + map.computeIfAbsent(recipebookcategories, (p_90645_) -> { + return Lists.newArrayList(); @@ -104,6 +_,8 @@ } else if (recipetype == RecipeType.f_44113_) { return RecipeBookCategories.SMITHING;