(PoseStack modelViewStack, Matrix4f projectionMatrix)
| 116 | } |
| 117 | |
| 118 | public void onRender(PoseStack modelViewStack, Matrix4f projectionMatrix) { |
| 119 | this.projectionViewMatrix = new Matrix4f(projectionMatrix); |
| 120 | this.projectionViewMatrix.mul(modelViewStack.last().pose()); |
| 121 | this.projectionViewMatrix.invert(); |
| 122 | |
| 123 | if (currentMouseOver != null) { |
| 124 | Entity e = mc.getCameraEntity(); |
| 125 | // drawSingleSelectionBox WHEN? |
| 126 | PathRenderer.drawManySelectionBoxes(modelViewStack, e, Collections.singletonList(currentMouseOver), Color.CYAN); |
| 127 | if (clickStart != null && !clickStart.equals(currentMouseOver)) { |
| 128 | BufferBuilder bufferBuilder = IRenderer.startLines(Color.RED, Baritone.settings().pathRenderLineWidthPixels.value); |
| 129 | BetterBlockPos a = new BetterBlockPos(currentMouseOver); |
| 130 | BetterBlockPos b = new BetterBlockPos(clickStart); |
| 131 | IRenderer.emitAABB(bufferBuilder, modelViewStack, new AABB(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.max(a.x, b.x) + 1, Math.max(a.y, b.y) + 1, Math.max(a.z, b.z) + 1)); |
| 132 | IRenderer.endLines(bufferBuilder, true); |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | private Vec3 toWorld(double x, double y, double z) { |
| 138 | if (this.projectionViewMatrix == null) { |
no test coverage detected