aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
diff options
context:
space:
mode:
authorVixid <52578495+Vixid1@users.noreply.github.com>2022-10-30 10:26:40 +0000
committerGitHub <noreply@github.com>2022-10-30 21:26:40 +1100
commite4033c2dad92fedb7feb7cfdd205aa6290e4294b (patch)
treec27fb17b9d6c12c6cd115e1d002285abf5c1fedb /src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
parent0ff09b9032d2f1a9c5a8cab3c876037702445af6 (diff)
downloadnotenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.tar.gz
notenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.tar.bz2
notenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.zip
Recipe History and Fairy Soul distance meter. (#357)
Co-authored-by: Roman / Linnea Gräf <roman.graef@gmail.com> Co-authored-by: Walker Selby <git@walkerselby.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java12
1 files changed, 9 insertions, 3 deletions
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<NeuRecipe> 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<NeuRecipe> recipes = getAvailableRecipesFor(internalName);
if (recipes.isEmpty()) return false;
NotEnoughUpdates.INSTANCE.openGui = (new GuiItemRecipe(recipes, this));
+ RecipeHistory.add(NotEnoughUpdates.INSTANCE.openGui);
return true;
}