Focus the previous recipe if it's still visible when loading usage re… (#263)

* Focus the previous recipe if it's still visible when loading usage recipes.

* Reduced code duplication by extracting getRecipeHandlers

* Moved RecipeHandlerQuery to its own package-private file

* Refactored RecipeHandlerQuery methods

* Saving the current recipe when left clicking a machine's "Recipes" button

* Restored prevScreen so we can restore it with overlay

* Genericized GuiRecipe so that currentHandlers is no longer hidden in subclasses

* Cleaned up overlay handling

* Fixed trivial IDE warnings & bad JavaDoc on files I touched
This commit is contained in:
YannickMG authored and GitHub committed 2022-06-29 20:18:48 +02:00
1 parent f7a900e910
commit 5bbf275980
15 files changed
+177 -201

No files matched your search

@@ -35,7 +35,7 @@ public abstract class GuiRecipeTab extends Widget {
public static HashMap<String, HandlerInfo> handlerAdderFromIMC = new HashMap<>();
public static Set<String> handlerRemoverFromIMC = new HashSet<>();
private final GuiRecipe guiRecipe;
private final GuiRecipe<?> guiRecipe;
private final IRecipeHandler handler;
private final String handlerName;
private final String handlerID;
@@ -54,7 +54,7 @@ public abstract class GuiRecipeTab extends Widget {
protected abstract int getForegroundIconY();
public GuiRecipeTab(GuiRecipe guiRecipe, IRecipeHandler handler, int x, int y) {
public GuiRecipeTab(GuiRecipe<?> guiRecipe, IRecipeHandler handler, int x, int y) {
super();
this.x = x;
this.y = y;