diff options
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java | 12 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index d7061c22..a400d4a6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -20,7 +20,6 @@ import io.github.moulberry.notenoughupdates.miscgui.*; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.overlays.*; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; -import io.github.moulberry.notenoughupdates.recipes.CraftingOverlay; import io.github.moulberry.notenoughupdates.util.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.*; @@ -53,14 +52,15 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; -import javax.swing.*; -import java.awt.*; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import java.awt.Color; +import java.awt.Toolkit; import java.awt.datatransfer.StringSelection; import java.io.File; import java.io.IOException; import java.text.DecimalFormat; import java.text.NumberFormat; -import java.util.List; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -1643,6 +1643,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(); } |