renderPathIgnoreDepth

This commit is contained in:
leijurv 2018-10-10 20:38:24 -07:00 committed by Leijurv
parent fbf0f2271c
commit db21045cfb
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 11 additions and 0 deletions

View File

@ -312,6 +312,11 @@ public class Settings {
*/ */
public Setting<Boolean> renderSelectionBoxesIgnoreDepth = new Setting<>(false); public Setting<Boolean> renderSelectionBoxesIgnoreDepth = new Setting<>(false);
/**
* Ignore depth when rendering the path
*/
public Setting<Boolean> renderPathIgnoreDepth = new Setting<>(false);
/** /**
* Line width of the path when rendered, in pixels * Line width of the path when rendered, in pixels
*/ */

View File

@ -123,6 +123,9 @@ public final class PathRenderer implements Helper {
GlStateManager.glLineWidth(Baritone.settings().pathRenderLineWidthPixels.get()); GlStateManager.glLineWidth(Baritone.settings().pathRenderLineWidthPixels.get());
GlStateManager.disableTexture2D(); GlStateManager.disableTexture2D();
GlStateManager.depthMask(false); GlStateManager.depthMask(false);
if (Baritone.settings().renderPathIgnoreDepth.get()) {
GlStateManager.disableDepth();
}
List<BetterBlockPos> positions = path.positions(); List<BetterBlockPos> positions = path.positions();
int next; int next;
Tessellator tessellator = Tessellator.getInstance(); Tessellator tessellator = Tessellator.getInstance();
@ -163,6 +166,9 @@ public final class PathRenderer implements Helper {
drawLine(player, x1, y1, z1, x2, y2, z2, partialTicks); drawLine(player, x1, y1, z1, x2, y2, z2, partialTicks);
tessellator.draw(); tessellator.draw();
} }
if (Baritone.settings().renderPathIgnoreDepth.get()) {
GlStateManager.enableDepth();
}
//GlStateManager.color(0.0f, 0.0f, 0.0f, 0.4f); //GlStateManager.color(0.0f, 0.0f, 0.0f, 0.4f);
GlStateManager.depthMask(true); GlStateManager.depthMask(true);
GlStateManager.enableTexture2D(); GlStateManager.enableTexture2D();