renderSelectionBoxesIgnoreDepth

This commit is contained in:
Leijurv 2018-10-09 19:34:53 -07:00
parent fc9d13a03c
commit d3bf4ef198
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 15 additions and 1 deletions

View File

@ -307,6 +307,11 @@ public class Settings {
*/
public Setting<Boolean> renderGoalIgnoreDepth = new Setting<>(false);
/**
* Ignore depth when rendering the selection boxes (to break, to place, to walk into)
*/
public Setting<Boolean> renderSelectionBoxesIgnoreDepth = new Setting<>(false);
/**
* Line width of the path when rendered, in pixels
*/

View File

@ -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();