aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman / Nea <roman.graef@gmail.com>2022-02-09 00:17:00 +0100
committerGitHub <noreply@github.com>2022-02-08 18:17:00 -0500
commit79e2b6cc14ce934ad3882a66d693cdc5db29c31c (patch)
treeed140c2476f3a3c701296aa39e8fdc7da746aac4
parentc9b09df800776e6ad59db97bfec6b67c52792b2c (diff)
downloadNotEnoughUpdates-79e2b6cc14ce934ad3882a66d693cdc5db29c31c.tar.gz
NotEnoughUpdates-79e2b6cc14ce934ad3882a66d693cdc5db29c31c.tar.bz2
NotEnoughUpdates-79e2b6cc14ce934ad3882a66d693cdc5db29c31c.zip
no clue what the search does but this fixes it (#77)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 80795044..f3a38b13 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -1647,6 +1647,10 @@ public class NEUEventListener {
String containerName = null;
GuiScreen guiScreen = Minecraft.getMinecraft().currentScreen;
+ if (guiScreen instanceof GuiChest) {
+ containerName = ((ContainerChest) ((GuiChest) guiScreen).inventorySlots).getLowerChestInventory().getDisplayName().getUnformattedText();
+ }
+
if (GuiCustomEnchant.getInstance().shouldOverride(containerName) &&
GuiCustomEnchant.getInstance().keyboardInput()) {
event.setCanceled(true);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
index 286ccfa4..abcff897 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -1976,7 +1976,7 @@ public class StorageOverlay extends GuiElement {
searchBar.getText().isEmpty()) {
searchBar.setFocus(false);
}
- } else return Keyboard.getEventKey() != Keyboard.KEY_E;
+ } else return Keyboard.getEventKey() != Minecraft.getMinecraft().gameSettings.keyBindInventory.getKeyCode();
}