From e4033c2dad92fedb7feb7cfdd205aa6290e4294b Mon Sep 17 00:00:00 2001 From: Vixid <52578495+Vixid1@users.noreply.github.com> Date: Sun, 30 Oct 2022 10:26:40 +0000 Subject: Recipe History and Fairy Soul distance meter. (#357) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Roman / Linnea Gräf Co-authored-by: Walker Selby --- .../io/github/moulberry/notenoughupdates/NEUManager.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index af190244..71aa10b6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -34,6 +34,7 @@ import io.github.moulberry.notenoughupdates.recipes.CraftingOverlay; import io.github.moulberry.notenoughupdates.recipes.CraftingRecipe; import io.github.moulberry.notenoughupdates.recipes.Ingredient; import io.github.moulberry.notenoughupdates.recipes.NeuRecipe; +import io.github.moulberry.notenoughupdates.recipes.RecipeHistory; import io.github.moulberry.notenoughupdates.util.ApiUtil; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.HotmInformation; @@ -113,12 +114,16 @@ public class NEUManager { new KeyBinding("Show usages for item", Keyboard.KEY_U, "NotEnoughUpdates"); public final KeyBinding keybindViewRecipe = new KeyBinding("Show recipe for item", Keyboard.KEY_R, "NotEnoughUpdates"); + public final KeyBinding keybindPreviousRecipe = + new KeyBinding("Show previous recipe", Keyboard.KEY_LBRACKET, "NotEnoughUpdates"); + public final KeyBinding keybindNextRecipe = + new KeyBinding("Show next recipe", Keyboard.KEY_RBRACKET, "NotEnoughUpdates"); public final KeyBinding keybindToggleDisplay = new KeyBinding("Toggle NEU overlay", 0, "NotEnoughUpdates"); public final KeyBinding keybindClosePanes = new KeyBinding("Close NEU panes", 0, "NotEnoughUpdates"); public final KeyBinding keybindItemSelect = new KeyBinding("Select Item", -98 /*middle*/, "NotEnoughUpdates"); public final KeyBinding[] keybinds = new KeyBinding[]{ - keybindGive, keybindFavourite, keybindViewUsages, keybindViewRecipe, - keybindToggleDisplay, keybindClosePanes, keybindItemSelect + keybindGive, keybindFavourite, keybindViewUsages, keybindViewRecipe, keybindPreviousRecipe, + keybindNextRecipe, keybindToggleDisplay, keybindClosePanes, keybindItemSelect }; public String viewItemAttemptID = null; @@ -884,7 +889,6 @@ public class NEUManager { case "viewpotion": neu.sendChatMessage("/viewpotion " + internalName.split(";")[0].toLowerCase(Locale.ROOT)); } - displayGuiItemRecipe(internalName); } public void showRecipe(String internalName) { @@ -988,6 +992,7 @@ public class NEUManager { List usages = getAvailableUsagesFor(internalName); if (usages.isEmpty()) return false; NotEnoughUpdates.INSTANCE.openGui = (new GuiItemRecipe(usages, this)); + RecipeHistory.add(NotEnoughUpdates.INSTANCE.openGui); return true; } @@ -996,6 +1001,7 @@ public class NEUManager { List recipes = getAvailableRecipesFor(internalName); if (recipes.isEmpty()) return false; NotEnoughUpdates.INSTANCE.openGui = (new GuiItemRecipe(recipes, this)); + RecipeHistory.add(NotEnoughUpdates.INSTANCE.openGui); return true; } -- cgit