From 6e73b7b440b22c0e93cbe40d852cc609f7397509 Mon Sep 17 00:00:00 2001 From: Ascynx <78341107+Ascynx@users.noreply.github.com> Date: Thu, 15 Sep 2022 03:20:48 +0200 Subject: revert "Made it only show if no gui screen is open" (#284) --- .../notenoughupdates/overlays/TextTabOverlay.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') 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; } } -- cgit