Redirect a method to the recipe book container, to allow modded screens to have a recipe book. (#5873)
This commit is contained in:
parent
478b7e7ccc
commit
87e2fcb4e5
|
@ -1,5 +1,14 @@
|
||||||
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||||
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
|
||||||
|
@@ -89,7 +89,7 @@
|
||||||
|
this.func_205702_a();
|
||||||
|
this.field_193018_j.clear();
|
||||||
|
|
||||||
|
- for(RecipeBookCategories recipebookcategories : ClientRecipeBook.func_216769_b(this.field_201522_g)) {
|
||||||
|
+ for(RecipeBookCategories recipebookcategories : this.field_201522_g.getRecipeBookCategories()) {
|
||||||
|
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
|
||||||
|
}
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@
|
@@ -421,7 +421,7 @@
|
||||||
|
|
||||||
languagemanager.func_135045_a(language);
|
languagemanager.func_135045_a(language);
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/net/minecraft/inventory/container/RecipeBookContainer.java
|
||||||
|
+++ b/net/minecraft/inventory/container/RecipeBookContainer.java
|
||||||
|
@@ -31,4 +31,8 @@
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public abstract int func_203721_h();
|
||||||
|
+
|
||||||
|
+ public java.util.List<net.minecraft.client.util.RecipeBookCategories> getRecipeBookCategories() {
|
||||||
|
+ return net.minecraft.client.util.ClientRecipeBook.func_216769_b(this);
|
||||||
|
+ }
|
||||||
|
}
|
Loading…
Reference in New Issue