From db21045cfb86db262496395629ddd28cc2447116 Mon Sep 17 00:00:00 2001 From: leijurv Date: Wed, 10 Oct 2018 20:38:24 -0700 Subject: [PATCH] renderPathIgnoreDepth --- src/api/java/baritone/api/Settings.java | 5 +++++ src/main/java/baritone/utils/PathRenderer.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index a0360909..e79c5476 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -312,6 +312,11 @@ public class Settings { */ public Setting renderSelectionBoxesIgnoreDepth = new Setting<>(false); + /** + * Ignore depth when rendering the path + */ + public Setting renderPathIgnoreDepth = new Setting<>(false); + /** * Line width of the path when rendered, in pixels */ diff --git a/src/main/java/baritone/utils/PathRenderer.java b/src/main/java/baritone/utils/PathRenderer.java index b2720df5..bf73149e 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -123,6 +123,9 @@ public final class PathRenderer implements Helper { GlStateManager.glLineWidth(Baritone.settings().pathRenderLineWidthPixels.get()); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); + if (Baritone.settings().renderPathIgnoreDepth.get()) { + GlStateManager.disableDepth(); + } List positions = path.positions(); int next; Tessellator tessellator = Tessellator.getInstance(); @@ -163,6 +166,9 @@ public final class PathRenderer implements Helper { drawLine(player, x1, y1, z1, x2, y2, z2, partialTicks); tessellator.draw(); } + if (Baritone.settings().renderPathIgnoreDepth.get()) { + GlStateManager.enableDepth(); + } //GlStateManager.color(0.0f, 0.0f, 0.0f, 0.4f); GlStateManager.depthMask(true); GlStateManager.enableTexture2D();