aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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();
}