From b17f2ffb936b98cc2ba1072ac9406fe6f69c2153 Mon Sep 17 00:00:00 2001 From: tr7zw Date: Sun, 4 Aug 2024 18:16:15 +0200 Subject: [PATCH] Add debug screen config option --- src/main/java/dev/tr7zw/entityculling/Config.java | 1 + src/main/java/dev/tr7zw/entityculling/EntityCullingMod.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/tr7zw/entityculling/Config.java b/src/main/java/dev/tr7zw/entityculling/Config.java index 95cafa3..eb6ef0d 100644 --- a/src/main/java/dev/tr7zw/entityculling/Config.java +++ b/src/main/java/dev/tr7zw/entityculling/Config.java @@ -14,5 +14,6 @@ public class Config { public int sleepDelay = 10; public int hitboxLimit = 50; public boolean skipMarkerArmorStands = true; + public boolean showDebugScreenInfo = true; } diff --git a/src/main/java/dev/tr7zw/entityculling/EntityCullingMod.java b/src/main/java/dev/tr7zw/entityculling/EntityCullingMod.java index 0985efc..ccc121e 100644 --- a/src/main/java/dev/tr7zw/entityculling/EntityCullingMod.java +++ b/src/main/java/dev/tr7zw/entityculling/EntityCullingMod.java @@ -54,7 +54,7 @@ public void doWorldTick(TickEvent.WorldTickEvent event) { @SubscribeEvent public void doRenderGameOverlayEvent(RenderGameOverlayEvent.Text event) { - if (!Minecraft.getMinecraft().gameSettings.showDebugInfo) return; + if (!Minecraft.getMinecraft().gameSettings.showDebugInfo || !config.showDebugScreenInfo) return; ArrayList left = event.left; left.add("[Culling] Last pass: " + EntityCullingModBase.instance.cullTask.lastTime + "ms"); left.add("[Culling] Rendered Block Entities: " + EntityCullingModBase.instance.renderedBlockEntities + " Skipped: " + EntityCullingModBase.instance.skippedBlockEntities);