mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 20:22:17 +00:00
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:
1 parent
f7a900e910
commit
5bbf275980
15 files changed
+177
-201
No files matched your search
@@ -9,7 +9,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.util.Rectangle;
|
||||
|
||||
public class GuiRecipeCatalyst extends INEIGuiAdapter {
|
||||
private GuiRecipe guiRecipe;
|
||||
private GuiRecipe<?> guiRecipe;
|
||||
public static final int ingredientSize = 16;
|
||||
public static final int ingredientBorder = 1;
|
||||
public static final int tabBorder = 5;
|
||||
@@ -18,7 +18,7 @@ public class GuiRecipeCatalyst extends INEIGuiAdapter {
|
||||
private static final Rectangle catalystRect = new Rectangle();
|
||||
private static final Rectangle targetRect = new Rectangle();
|
||||
|
||||
public GuiRecipeCatalyst(GuiRecipe guiRecipe) {
|
||||
public GuiRecipeCatalyst(GuiRecipe<?> guiRecipe) {
|
||||
this.guiRecipe = guiRecipe;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class GuiRecipeCatalyst extends INEIGuiAdapter {
|
||||
@Override
|
||||
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
|
||||
if (!(gui instanceof GuiRecipe)) return false;
|
||||
guiRecipe = (GuiRecipe) gui;
|
||||
guiRecipe = (GuiRecipe<?>) gui;
|
||||
int catalystsSize =
|
||||
RecipeCatalysts.getRecipeCatalysts(guiRecipe.getHandler()).size();
|
||||
if (catalystsSize == 0) return false;
|
||||
|
||||
Reference in new issue
Block a user