diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index a755786f..a0360909 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -307,6 +307,11 @@ public class Settings { */ public Setting renderGoalIgnoreDepth = new Setting<>(false); + /** + * Ignore depth when rendering the selection boxes (to break, to place, to walk into) + */ + public Setting renderSelectionBoxesIgnoreDepth = 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 841876d8..cde3f1b4 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -19,11 +19,11 @@ package baritone.utils; import baritone.Baritone; import baritone.api.event.events.RenderEvent; +import baritone.api.pathing.calc.IPath; import baritone.api.pathing.goals.Goal; import baritone.api.pathing.goals.GoalComposite; import baritone.api.pathing.goals.GoalTwoBlocks; import baritone.api.pathing.goals.GoalXZ; -import baritone.api.pathing.calc.IPath; import baritone.api.utils.BetterBlockPos; import baritone.api.utils.interfaces.IGoalRenderPos; import baritone.behavior.PathingBehavior; @@ -187,6 +187,11 @@ public final class PathRenderer implements Helper { GlStateManager.glLineWidth(Baritone.settings().pathRenderLineWidthPixels.get()); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); + + if (Baritone.settings().renderSelectionBoxesIgnoreDepth.get()) { + GlStateManager.disableDepth(); + } + float expand = 0.002F; //BlockPos blockpos = movingObjectPositionIn.getBlockPos(); @@ -228,6 +233,10 @@ public final class PathRenderer implements Helper { TESSELLATOR.draw(); }); + if (Baritone.settings().renderSelectionBoxesIgnoreDepth.get()) { + GlStateManager.enableDepth(); + } + GlStateManager.depthMask(true); GlStateManager.enableTexture2D(); GlStateManager.disableBlend();