diff options
author | Ascynx <78341107+Ascynx@users.noreply.github.com> | 2022-09-15 03:20:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 11:20:48 +1000 |
commit | 6e73b7b440b22c0e93cbe40d852cc609f7397509 (patch) | |
tree | 066e19092c0fa6cdadced9d4c24540e6f48c565b | |
parent | 2d8c295a9280337bace055fd2cedae8af17995ee (diff) | |
download | NotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.tar.gz NotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.tar.bz2 NotEnoughUpdates-6e73b7b440b22c0e93cbe40d852cc609f7397509.zip |
revert "Made it only show if no gui screen is open" (#284)
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java | 14 |
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; } } |