aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAscynx <78341107+Ascynx@users.noreply.github.com>2022-09-15 03:20:48 +0200
committerGitHub <noreply@github.com>2022-09-15 11:20:48 +1000
commit6e73b7b440b22c0e93cbe40d852cc609f7397509 (patch)
tree066e19092c0fa6cdadced9d4c24540e6f48c565b /src/main/java
parent2d8c295a9280337bace055fd2cedae8af17995ee (diff)
downloadNotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.tar.gz
NotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.tar.bz2
NotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.zip
revert "Made it only show if no gui screen is open" (#284)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
index 8073062c..03578c95 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
@@ -21,6 +21,7 @@ package io.github.moulberry.notenoughupdates.overlays;
import io.github.moulberry.notenoughupdates.core.config.Position;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiChat;
import org.lwjgl.input.Keyboard;
import java.util.List;
@@ -58,7 +59,16 @@ public abstract class TextTabOverlay extends TextOverlay {
}
private boolean shouldUpdate() {
- //prevent rendering unless no gui is open
- return Minecraft.getMinecraft().currentScreen == null;
+ //prevent rendering when tab completing a command
+ if (Minecraft.getMinecraft().currentScreen instanceof GuiChat) {
+ return false;
+ }
+
+ //prevent rendering when tab completing in ah search overlay
+ if (AuctionSearchOverlay.shouldReplace()) {
+ return false;
+ }
+
+ return true;
}
}