diff options
author | nea <romangraef@gmail.com> | 2022-02-08 14:24:33 +0100 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-02-08 14:24:33 +0100 |
commit | 5761784f60a08133aac920083e62e56e4c53def8 (patch) | |
tree | f7a13f7e6569c4a59a8c1588731358265af66823 | |
parent | 73d441245e33461f5ee9e2f44bfc15891f50f9c1 (diff) | |
download | NotEnoughUpdates-fix_storage-gui/search.tar.gz NotEnoughUpdates-fix_storage-gui/search.tar.bz2 NotEnoughUpdates-fix_storage-gui/search.zip |
no clue what the search does but this fixes itfix_storage-gui/search
-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(); } |