From c2af12bece2ca32ef88821f8e5b5f121af48da92 Mon Sep 17 00:00:00 2001 From: MODKILLER1001 Date: Thu, 15 Sep 2022 00:39:51 -0400 Subject: unfuck it up --- .../nochatreports/mixins/client/MixinChatOptionsScreen.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatOptionsScreen.java b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatOptionsScreen.java index dab16ad..6b3d0f5 100644 --- a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatOptionsScreen.java +++ b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatOptionsScreen.java @@ -5,6 +5,7 @@ import java.util.List; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; +import com.aizistral.nochatreports.config.NCRConfig; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; @@ -43,6 +44,10 @@ public class MixinChatOptionsScreen extends SimpleOptionsSubScreen { @Override protected void init() { super.init(); + + if (!NCRConfig.getClient().enableMod()) + return; + this.secureChatTooltip = Minecraft.getInstance().font.split(Component.translatable("gui.nochatreport.secureChat"), 200); this.onlyShowSecureChat = this.list.findOption(Minecraft.getInstance().options.onlyShowSecureChat()); @@ -60,8 +65,12 @@ public class MixinChatOptionsScreen extends SimpleOptionsSubScreen { @Override public void render(@NotNull PoseStack poseStack, int x, int y, float f) { super.render(poseStack, x, y, f); + + if (!NCRConfig.getClient().enableMod()) + return; + if (this.onlyShowSecureChat != null && this.onlyShowSecureChat.visible && x >= (double) this.onlyShowSecureChat.x && y >= (double) this.onlyShowSecureChat.y && x < (double) (this.onlyShowSecureChat.x + this.onlyShowSecureChat.getWidth()) && y < (double) (this.onlyShowSecureChat.y + this.onlyShowSecureChat.getHeight())) { this.renderTooltip(poseStack, this.secureChatTooltip, x, y); } } -} +} \ No newline at end of file -- cgit v1.2.3