From bcf96ed1304ea0935f92fe591f879d4eb4e45576 Mon Sep 17 00:00:00 2001 From: brandyn Date: Mon, 26 May 2025 02:38:18 +0100 Subject: [PATCH] Add configurable F3 Debug (#78) Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com> --- .../vazkii/botania/client/core/handler/DebugHandler.java | 2 +- .../vazkii/botania/common/core/handler/ConfigHandler.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/client/core/handler/DebugHandler.java b/src/main/java/vazkii/botania/client/core/handler/DebugHandler.java index 9e6055b7a..f1cf7a14d 100644 --- a/src/main/java/vazkii/botania/client/core/handler/DebugHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/DebugHandler.java @@ -35,7 +35,7 @@ public final class DebugHandler { @SubscribeEvent public void onDrawDebugText(RenderGameOverlayEvent.Text event) { World world = Minecraft.getMinecraft().theWorld; - if(Minecraft.getMinecraft().gameSettings.showDebugInfo) { + if(Minecraft.getMinecraft().gameSettings.showDebugInfo && ConfigHandler.showF3Debug) { event.left.add(null); String version = LibMisc.VERSION; if(version.contains("GRADLE")) diff --git a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java index 7276e58e0..b6e80ff45 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -48,6 +48,8 @@ public final class ConfigHandler { public static boolean enableDefaultRecipes = true; + public static boolean showF3Debug = true; + public static boolean useShaders = true; public static boolean lexiconRotatingItems = true; public static boolean lexiconJustifiedText = false; @@ -210,6 +212,9 @@ public final class ConfigHandler { desc = "The ID of the dimension to use"; fancySkyboxDimensions = loadPropIntSet("fancySkybox.customDimID", desc, fancySkyboxDimensions); + desc = "Turn on or off the debug info in the F3 screen ingame"; + showF3Debug = loadPropBool("showF3Debug", desc, showF3Debug); + desc = "The height of the mana display bar in above the XP bar. You can change this if you have a mod that changes where the XP bar is."; manaBarHeight = loadPropInt("manaBar.height", desc, manaBarHeight);