diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java index b09afa46d..949e4062d 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java @@ -40,7 +40,7 @@ public class RecipeViewingWidget extends Gui { private int page, categoryPages; private ButtonWidget recipeBack, recipeNext, categoryBack, categoryNext; - public RecipeViewingWidget(ContainerGuiOverlay overlay, Window window, IMixinContainerGui parent, Map<IRecipeCategory, List<IRecipeDisplay>> categoriesMap) { + public RecipeViewingWidget(Window window, IMixinContainerGui parent, Map<IRecipeCategory, List<IRecipeDisplay>> categoriesMap) { this.categoryPages = 0; this.parent = parent; this.window = window; @@ -50,7 +50,7 @@ public class RecipeViewingWidget extends Gui { this.categories = new LinkedList<>(categoriesMap.keySet()); Collections.reverse(categories); this.selectedCategory = categories.get(0); - this.overlay = overlay; + this.overlay = parent.getOverlay(); this.tabs = new ArrayList<>(); } @@ -75,6 +75,11 @@ public class RecipeViewingWidget extends Gui { } @Override + public void onClosed() { + parent.setOverlay(overlay); + } + + @Override protected void onInitialized() { super.onInitialized(); this.tabs.clear(); |
